// Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with
// the License. You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on
// an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the
// specific language governing permissions and limitations under the License.

//------------------------------------------------------------------------------
// <auto-generated>
//     This code was generated by google-apis-code-generator 1.5.1
//     C# generator version: 1.22.0
//
//     Changes to this file may cause incorrect behavior and will be lost if
//     the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------

/**
 * \brief
 *   BigQuery API Version v2
 *
 * \section ApiInfo API Version Information
 *    <table>
 *      <tr><th>API
 *          <td><a href='https://cloud.google.com/bigquery/'>BigQuery API</a>
 *      <tr><th>API Version<td>v2
 *      <tr><th>API Rev<td>20170319 (808)
 *      <tr><th>API Docs
 *          <td><a href='https://cloud.google.com/bigquery/'>
 *              https://cloud.google.com/bigquery/</a>
 *      <tr><th>Discovery Name<td>bigquery
 *    </table>
 *
 * \section ForMoreInfo For More Information
 *
 * The complete API documentation for using BigQuery API can be found at
 * <a href='https://cloud.google.com/bigquery/'>https://cloud.google.com/bigquery/</a>.
 *
 * For more information about the Google APIs Client Library for .NET, see
 * <a href='https://developers.google.com/api-client-library/dotnet/get_started'>
 * https://developers.google.com/api-client-library/dotnet/get_started</a>
 */

namespace Google.Apis.Bigquery.v2
{
    /// <summary>The Bigquery Service.</summary>
    public class BigqueryService : Google.Apis.Services.BaseClientService
    {
        /// <summary>The API version.</summary>
        public const string Version = "v2";

        /// <summary>The discovery version used to generate this service.</summary>
        public static Google.Apis.Discovery.DiscoveryVersion DiscoveryVersionUsed =
            Google.Apis.Discovery.DiscoveryVersion.Version_1_0;

        /// <summary>Constructs a new service.</summary>
        public BigqueryService() :
            this(new Google.Apis.Services.BaseClientService.Initializer()) {}

        /// <summary>Constructs a new service.</summary>
        /// <param name="initializer">The service initializer.</param>
        public BigqueryService(Google.Apis.Services.BaseClientService.Initializer initializer)
            : base(initializer)
        {
            datasets = new DatasetsResource(this);
            jobs = new JobsResource(this);
            projects = new ProjectsResource(this);
            tabledata = new TabledataResource(this);
            tables = new TablesResource(this);
        }

        /// <summary>Gets the service supported features.</summary>
        public override System.Collections.Generic.IList<string> Features
        {
            get { return new string[0]; }
        }

        /// <summary>Gets the service name.</summary>
        public override string Name
        {
            get { return "bigquery"; }
        }

        /// <summary>Gets the service base URI.</summary>
        public override string BaseUri
        {
            get { return "https://www.googleapis.com/bigquery/v2/"; }
        }

        /// <summary>Gets the service base path.</summary>
        public override string BasePath
        {
            get { return "bigquery/v2/"; }
        }

        /// <summary>Available OAuth 2.0 scopes for use with the BigQuery API.</summary>
        public class Scope
        {
            /// <summary>View and manage your data in Google BigQuery</summary>
            public static string Bigquery = "https://www.googleapis.com/auth/bigquery";

            /// <summary>Insert data into Google BigQuery</summary>
            public static string BigqueryInsertdata = "https://www.googleapis.com/auth/bigquery.insertdata";

            /// <summary>View and manage your data across Google Cloud Platform services</summary>
            public static string CloudPlatform = "https://www.googleapis.com/auth/cloud-platform";

            /// <summary>View your data across Google Cloud Platform services</summary>
            public static string CloudPlatformReadOnly = "https://www.googleapis.com/auth/cloud-platform.read-only";

            /// <summary>Manage your data and permissions in Google Cloud Storage</summary>
            public static string DevstorageFullControl = "https://www.googleapis.com/auth/devstorage.full_control";

            /// <summary>View your data in Google Cloud Storage</summary>
            public static string DevstorageReadOnly = "https://www.googleapis.com/auth/devstorage.read_only";

            /// <summary>Manage your data in Google Cloud Storage</summary>
            public static string DevstorageReadWrite = "https://www.googleapis.com/auth/devstorage.read_write";

        }



        private readonly DatasetsResource datasets;

        /// <summary>Gets the Datasets resource.</summary>
        public virtual DatasetsResource Datasets
        {
            get { return datasets; }
        }

        private readonly JobsResource jobs;

        /// <summary>Gets the Jobs resource.</summary>
        public virtual JobsResource Jobs
        {
            get { return jobs; }
        }

        private readonly ProjectsResource projects;

        /// <summary>Gets the Projects resource.</summary>
        public virtual ProjectsResource Projects
        {
            get { return projects; }
        }

        private readonly TabledataResource tabledata;

        /// <summary>Gets the Tabledata resource.</summary>
        public virtual TabledataResource Tabledata
        {
            get { return tabledata; }
        }

        private readonly TablesResource tables;

        /// <summary>Gets the Tables resource.</summary>
        public virtual TablesResource Tables
        {
            get { return tables; }
        }
    }

    ///<summary>A base abstract class for Bigquery requests.</summary>
    public abstract class BigqueryBaseServiceRequest<TResponse> : Google.Apis.Requests.ClientServiceRequest<TResponse>
    {
        ///<summary>Constructs a new BigqueryBaseServiceRequest instance.</summary>
        protected BigqueryBaseServiceRequest(Google.Apis.Services.IClientService service)
            : base(service)
        {
        }

        /// <summary>Data format for the response.</summary>
        /// [default: json]
        [Google.Apis.Util.RequestParameterAttribute("alt", Google.Apis.Util.RequestParameterType.Query)]
        public virtual System.Nullable<AltEnum> Alt { get; set; }

        /// <summary>Data format for the response.</summary>
        public enum AltEnum
        {
            /// <summary>Responses with Content-Type of application/json</summary>
            [Google.Apis.Util.StringValueAttribute("json")]
            Json,
        }

        /// <summary>Selector specifying which fields to include in a partial response.</summary>
        [Google.Apis.Util.RequestParameterAttribute("fields", Google.Apis.Util.RequestParameterType.Query)]
        public virtual string Fields { get; set; }

        /// <summary>API key. Your API key identifies your project and provides you with API access, quota, and reports.
        /// Required unless you provide an OAuth 2.0 token.</summary>
        [Google.Apis.Util.RequestParameterAttribute("key", Google.Apis.Util.RequestParameterType.Query)]
        public virtual string Key { get; set; }

        /// <summary>OAuth 2.0 token for the current user.</summary>
        [Google.Apis.Util.RequestParameterAttribute("oauth_token", Google.Apis.Util.RequestParameterType.Query)]
        public virtual string OauthToken { get; set; }

        /// <summary>Returns response with indentations and line breaks.</summary>
        /// [default: true]
        [Google.Apis.Util.RequestParameterAttribute("prettyPrint", Google.Apis.Util.RequestParameterType.Query)]
        public virtual System.Nullable<bool> PrettyPrint { get; set; }

        /// <summary>Available to use for quota purposes for server-side applications. Can be any arbitrary string
        /// assigned to a user, but should not exceed 40 characters. Overrides userIp if both are provided.</summary>
        [Google.Apis.Util.RequestParameterAttribute("quotaUser", Google.Apis.Util.RequestParameterType.Query)]
        public virtual string QuotaUser { get; set; }

        /// <summary>IP address of the site where the request originates. Use this if you want to enforce per-user
        /// limits.</summary>
        [Google.Apis.Util.RequestParameterAttribute("userIp", Google.Apis.Util.RequestParameterType.Query)]
        public virtual string UserIp { get; set; }

        /// <summary>Initializes Bigquery parameter list.</summary>
        protected override void InitParameters()
        {
            base.InitParameters();

            RequestParameters.Add(
                "alt", new Google.Apis.Discovery.Parameter
                {
                    Name = "alt",
                    IsRequired = false,
                    ParameterType = "query",
                    DefaultValue = "json",
                    Pattern = null,
                });
            RequestParameters.Add(
                "fields", new Google.Apis.Discovery.Parameter
                {
                    Name = "fields",
                    IsRequired = false,
                    ParameterType = "query",
                    DefaultValue = null,
                    Pattern = null,
                });
            RequestParameters.Add(
                "key", new Google.Apis.Discovery.Parameter
                {
                    Name = "key",
                    IsRequired = false,
                    ParameterType = "query",
                    DefaultValue = null,
                    Pattern = null,
                });
            RequestParameters.Add(
                "oauth_token", new Google.Apis.Discovery.Parameter
                {
                    Name = "oauth_token",
                    IsRequired = false,
                    ParameterType = "query",
                    DefaultValue = null,
                    Pattern = null,
                });
            RequestParameters.Add(
                "prettyPrint", new Google.Apis.Discovery.Parameter
                {
                    Name = "prettyPrint",
                    IsRequired = false,
                    ParameterType = "query",
                    DefaultValue = "true",
                    Pattern = null,
                });
            RequestParameters.Add(
                "quotaUser", new Google.Apis.Discovery.Parameter
                {
                    Name = "quotaUser",
                    IsRequired = false,
                    ParameterType = "query",
                    DefaultValue = null,
                    Pattern = null,
                });
            RequestParameters.Add(
                "userIp", new Google.Apis.Discovery.Parameter
                {
                    Name = "userIp",
                    IsRequired = false,
                    ParameterType = "query",
                    DefaultValue = null,
                    Pattern = null,
                });
        }
    }

    /// <summary>The "datasets" collection of methods.</summary>
    public class DatasetsResource
    {
        private const string Resource = "datasets";

        /// <summary>The service which this resource belongs to.</summary>
        private readonly Google.Apis.Services.IClientService service;

        /// <summary>Constructs a new resource.</summary>
        public DatasetsResource(Google.Apis.Services.IClientService service)
        {
            this.service = service;

        }


        /// <summary>Deletes the dataset specified by the datasetId value. Before you can delete a dataset, you must
        /// delete all its tables, either manually or by specifying deleteContents. Immediately after deletion, you can
        /// create another dataset with the same name.</summary>
        /// <param name="projectId">Project ID of the dataset being deleted</param>
        /// <param name="datasetId">Dataset ID
        /// of dataset being deleted</param>
        public virtual DeleteRequest Delete(string projectId, string datasetId)
        {
            return new DeleteRequest(service, projectId, datasetId);
        }

        /// <summary>Deletes the dataset specified by the datasetId value. Before you can delete a dataset, you must
        /// delete all its tables, either manually or by specifying deleteContents. Immediately after deletion, you can
        /// create another dataset with the same name.</summary>
        public class DeleteRequest : BigqueryBaseServiceRequest<string>
        {
            /// <summary>Constructs a new Delete request.</summary>
            public DeleteRequest(Google.Apis.Services.IClientService service, string projectId, string datasetId)
                : base(service)
            {
                ProjectId = projectId;
                DatasetId = datasetId;
                InitParameters();
            }


            /// <summary>Project ID of the dataset being deleted</summary>
            [Google.Apis.Util.RequestParameterAttribute("projectId", Google.Apis.Util.RequestParameterType.Path)]
            public virtual string ProjectId { get; private set; }

            /// <summary>Dataset ID of dataset being deleted</summary>
            [Google.Apis.Util.RequestParameterAttribute("datasetId", Google.Apis.Util.RequestParameterType.Path)]
            public virtual string DatasetId { get; private set; }

            /// <summary>If True, delete all the tables in the dataset. If False and the dataset contains tables, the
            /// request will fail. Default is False</summary>
            [Google.Apis.Util.RequestParameterAttribute("deleteContents", Google.Apis.Util.RequestParameterType.Query)]
            public virtual System.Nullable<bool> DeleteContents { get; set; }


            ///<summary>Gets the method name.</summary>
            public override string MethodName
            {
                get { return "delete"; }
            }

            ///<summary>Gets the HTTP method.</summary>
            public override string HttpMethod
            {
                get { return "DELETE"; }
            }

            ///<summary>Gets the REST path.</summary>
            public override string RestPath
            {
                get { return "projects/{projectId}/datasets/{datasetId}"; }
            }

            /// <summary>Initializes Delete parameter list.</summary>
            protected override void InitParameters()
            {
                base.InitParameters();

                RequestParameters.Add(
                    "projectId", new Google.Apis.Discovery.Parameter
                    {
                        Name = "projectId",
                        IsRequired = true,
                        ParameterType = "path",
                        DefaultValue = null,
                        Pattern = null,
                    });
                RequestParameters.Add(
                    "datasetId", new Google.Apis.Discovery.Parameter
                    {
                        Name = "datasetId",
                        IsRequired = true,
                        ParameterType = "path",
                        DefaultValue = null,
                        Pattern = null,
                    });
                RequestParameters.Add(
                    "deleteContents", new Google.Apis.Discovery.Parameter
                    {
                        Name = "deleteContents",
                        IsRequired = false,
                        ParameterType = "query",
                        DefaultValue = null,
                        Pattern = null,
                    });
            }

        }

        /// <summary>Returns the dataset specified by datasetID.</summary>
        /// <param name="projectId">Project ID of the requested dataset</param>
        /// <param name="datasetId">Dataset ID of
        /// the requested dataset</param>
        public virtual GetRequest Get(string projectId, string datasetId)
        {
            return new GetRequest(service, projectId, datasetId);
        }

        /// <summary>Returns the dataset specified by datasetID.</summary>
        public class GetRequest : BigqueryBaseServiceRequest<Google.Apis.Bigquery.v2.Data.Dataset>
        {
            /// <summary>Constructs a new Get request.</summary>
            public GetRequest(Google.Apis.Services.IClientService service, string projectId, string datasetId)
                : base(service)
            {
                ProjectId = projectId;
                DatasetId = datasetId;
                InitParameters();
            }


            /// <summary>Project ID of the requested dataset</summary>
            [Google.Apis.Util.RequestParameterAttribute("projectId", Google.Apis.Util.RequestParameterType.Path)]
            public virtual string ProjectId { get; private set; }

            /// <summary>Dataset ID of the requested dataset</summary>
            [Google.Apis.Util.RequestParameterAttribute("datasetId", Google.Apis.Util.RequestParameterType.Path)]
            public virtual string DatasetId { get; private set; }


            ///<summary>Gets the method name.</summary>
            public override string MethodName
            {
                get { return "get"; }
            }

            ///<summary>Gets the HTTP method.</summary>
            public override string HttpMethod
            {
                get { return "GET"; }
            }

            ///<summary>Gets the REST path.</summary>
            public override string RestPath
            {
                get { return "projects/{projectId}/datasets/{datasetId}"; }
            }

            /// <summary>Initializes Get parameter list.</summary>
            protected override void InitParameters()
            {
                base.InitParameters();

                RequestParameters.Add(
                    "projectId", new Google.Apis.Discovery.Parameter
                    {
                        Name = "projectId",
                        IsRequired = true,
                        ParameterType = "path",
                        DefaultValue = null,
                        Pattern = null,
                    });
                RequestParameters.Add(
                    "datasetId", new Google.Apis.Discovery.Parameter
                    {
                        Name = "datasetId",
                        IsRequired = true,
                        ParameterType = "path",
                        DefaultValue = null,
                        Pattern = null,
                    });
            }

        }

        /// <summary>Creates a new empty dataset.</summary>
        /// <param name="body">The body of the request.</param>
        /// <param name="projectId">Project ID of the new dataset</param>
        public virtual InsertRequest Insert(Google.Apis.Bigquery.v2.Data.Dataset body, string projectId)
        {
            return new InsertRequest(service, body, projectId);
        }

        /// <summary>Creates a new empty dataset.</summary>
        public class InsertRequest : BigqueryBaseServiceRequest<Google.Apis.Bigquery.v2.Data.Dataset>
        {
            /// <summary>Constructs a new Insert request.</summary>
            public InsertRequest(Google.Apis.Services.IClientService service, Google.Apis.Bigquery.v2.Data.Dataset body, string projectId)
                : base(service)
            {
                ProjectId = projectId;
                Body = body;
                InitParameters();
            }


            /// <summary>Project ID of the new dataset</summary>
            [Google.Apis.Util.RequestParameterAttribute("projectId", Google.Apis.Util.RequestParameterType.Path)]
            public virtual string ProjectId { get; private set; }


            /// <summary>Gets or sets the body of this request.</summary>
            Google.Apis.Bigquery.v2.Data.Dataset Body { get; set; }

            ///<summary>Returns the body of the request.</summary>
            protected override object GetBody() { return Body; }

            ///<summary>Gets the method name.</summary>
            public override string MethodName
            {
                get { return "insert"; }
            }

            ///<summary>Gets the HTTP method.</summary>
            public override string HttpMethod
            {
                get { return "POST"; }
            }

            ///<summary>Gets the REST path.</summary>
            public override string RestPath
            {
                get { return "projects/{projectId}/datasets"; }
            }

            /// <summary>Initializes Insert parameter list.</summary>
            protected override void InitParameters()
            {
                base.InitParameters();

                RequestParameters.Add(
                    "projectId", new Google.Apis.Discovery.Parameter
                    {
                        Name = "projectId",
                        IsRequired = true,
                        ParameterType = "path",
                        DefaultValue = null,
                        Pattern = null,
                    });
            }

        }

        /// <summary>Lists all datasets in the specified project to which you have been granted the READER dataset
        /// role.</summary>
        /// <param name="projectId">Project ID of the datasets to be listed</param>
        public virtual ListRequest List(string projectId)
        {
            return new ListRequest(service, projectId);
        }

        /// <summary>Lists all datasets in the specified project to which you have been granted the READER dataset
        /// role.</summary>
        public class ListRequest : BigqueryBaseServiceRequest<Google.Apis.Bigquery.v2.Data.DatasetList>
        {
            /// <summary>Constructs a new List request.</summary>
            public ListRequest(Google.Apis.Services.IClientService service, string projectId)
                : base(service)
            {
                ProjectId = projectId;
                InitParameters();
            }


            /// <summary>Project ID of the datasets to be listed</summary>
            [Google.Apis.Util.RequestParameterAttribute("projectId", Google.Apis.Util.RequestParameterType.Path)]
            public virtual string ProjectId { get; private set; }

            /// <summary>Whether to list all datasets, including hidden ones</summary>
            [Google.Apis.Util.RequestParameterAttribute("all", Google.Apis.Util.RequestParameterType.Query)]
            public virtual System.Nullable<bool> All { get; set; }

            /// <summary>An expression for filtering the results of the request by label. The syntax is "labels.[:]".
            /// Multiple filters can be ANDed together by connecting with a space. Example: "labels.department:receiving
            /// labels.active". See Filtering datasets using labels for details.</summary>
            [Google.Apis.Util.RequestParameterAttribute("filter", Google.Apis.Util.RequestParameterType.Query)]
            public virtual string Filter { get; set; }

            /// <summary>The maximum number of results to return</summary>
            [Google.Apis.Util.RequestParameterAttribute("maxResults", Google.Apis.Util.RequestParameterType.Query)]
            public virtual System.Nullable<long> MaxResults { get; set; }

            /// <summary>Page token, returned by a previous call, to request the next page of results</summary>
            [Google.Apis.Util.RequestParameterAttribute("pageToken", Google.Apis.Util.RequestParameterType.Query)]
            public virtual string PageToken { get; set; }


            ///<summary>Gets the method name.</summary>
            public override string MethodName
            {
                get { return "list"; }
            }

            ///<summary>Gets the HTTP method.</summary>
            public override string HttpMethod
            {
                get { return "GET"; }
            }

            ///<summary>Gets the REST path.</summary>
            public override string RestPath
            {
                get { return "projects/{projectId}/datasets"; }
            }

            /// <summary>Initializes List parameter list.</summary>
            protected override void InitParameters()
            {
                base.InitParameters();

                RequestParameters.Add(
                    "projectId", new Google.Apis.Discovery.Parameter
                    {
                        Name = "projectId",
                        IsRequired = true,
                        ParameterType = "path",
                        DefaultValue = null,
                        Pattern = null,
                    });
                RequestParameters.Add(
                    "all", new Google.Apis.Discovery.Parameter
                    {
                        Name = "all",
                        IsRequired = false,
                        ParameterType = "query",
                        DefaultValue = null,
                        Pattern = null,
                    });
                RequestParameters.Add(
                    "filter", new Google.Apis.Discovery.Parameter
                    {
                        Name = "filter",
                        IsRequired = false,
                        ParameterType = "query",
                        DefaultValue = null,
                        Pattern = null,
                    });
                RequestParameters.Add(
                    "maxResults", new Google.Apis.Discovery.Parameter
                    {
                        Name = "maxResults",
                        IsRequired = false,
                        ParameterType = "query",
                        DefaultValue = null,
                        Pattern = null,
                    });
                RequestParameters.Add(
                    "pageToken", new Google.Apis.Discovery.Parameter
                    {
                        Name = "pageToken",
                        IsRequired = false,
                        ParameterType = "query",
                        DefaultValue = null,
                        Pattern = null,
                    });
            }

        }

        /// <summary>Updates information in an existing dataset. The update method replaces the entire dataset resource,
        /// whereas the patch method only replaces fields that are provided in the submitted dataset resource. This
        /// method supports patch semantics.</summary>
        /// <param name="body">The body of the request.</param>
        /// <param name="projectId">Project ID of the dataset being updated</param>
        /// <param name="datasetId">Dataset ID
        /// of the dataset being updated</param>
        public virtual PatchRequest Patch(Google.Apis.Bigquery.v2.Data.Dataset body, string projectId, string datasetId)
        {
            return new PatchRequest(service, body, projectId, datasetId);
        }

        /// <summary>Updates information in an existing dataset. The update method replaces the entire dataset resource,
        /// whereas the patch method only replaces fields that are provided in the submitted dataset resource. This
        /// method supports patch semantics.</summary>
        public class PatchRequest : BigqueryBaseServiceRequest<Google.Apis.Bigquery.v2.Data.Dataset>
        {
            /// <summary>Constructs a new Patch request.</summary>
            public PatchRequest(Google.Apis.Services.IClientService service, Google.Apis.Bigquery.v2.Data.Dataset body, string projectId, string datasetId)
                : base(service)
            {
                ProjectId = projectId;
                DatasetId = datasetId;
                Body = body;
                InitParameters();
            }


            /// <summary>Project ID of the dataset being updated</summary>
            [Google.Apis.Util.RequestParameterAttribute("projectId", Google.Apis.Util.RequestParameterType.Path)]
            public virtual string ProjectId { get; private set; }

            /// <summary>Dataset ID of the dataset being updated</summary>
            [Google.Apis.Util.RequestParameterAttribute("datasetId", Google.Apis.Util.RequestParameterType.Path)]
            public virtual string DatasetId { get; private set; }


            /// <summary>Gets or sets the body of this request.</summary>
            Google.Apis.Bigquery.v2.Data.Dataset Body { get; set; }

            ///<summary>Returns the body of the request.</summary>
            protected override object GetBody() { return Body; }

            ///<summary>Gets the method name.</summary>
            public override string MethodName
            {
                get { return "patch"; }
            }

            ///<summary>Gets the HTTP method.</summary>
            public override string HttpMethod
            {
                get { return "PATCH"; }
            }

            ///<summary>Gets the REST path.</summary>
            public override string RestPath
            {
                get { return "projects/{projectId}/datasets/{datasetId}"; }
            }

            /// <summary>Initializes Patch parameter list.</summary>
            protected override void InitParameters()
            {
                base.InitParameters();

                RequestParameters.Add(
                    "projectId", new Google.Apis.Discovery.Parameter
                    {
                        Name = "projectId",
                        IsRequired = true,
                        ParameterType = "path",
                        DefaultValue = null,
                        Pattern = null,
                    });
                RequestParameters.Add(
                    "datasetId", new Google.Apis.Discovery.Parameter
                    {
                        Name = "datasetId",
                        IsRequired = true,
                        ParameterType = "path",
                        DefaultValue = null,
                        Pattern = null,
                    });
            }

        }

        /// <summary>Updates information in an existing dataset. The update method replaces the entire dataset resource,
        /// whereas the patch method only replaces fields that are provided in the submitted dataset resource.</summary>
        /// <param name="body">The body of the request.</param>
        /// <param name="projectId">Project ID of the dataset being updated</param>
        /// <param name="datasetId">Dataset ID
        /// of the dataset being updated</param>
        public virtual UpdateRequest Update(Google.Apis.Bigquery.v2.Data.Dataset body, string projectId, string datasetId)
        {
            return new UpdateRequest(service, body, projectId, datasetId);
        }

        /// <summary>Updates information in an existing dataset. The update method replaces the entire dataset resource,
        /// whereas the patch method only replaces fields that are provided in the submitted dataset resource.</summary>
        public class UpdateRequest : BigqueryBaseServiceRequest<Google.Apis.Bigquery.v2.Data.Dataset>
        {
            /// <summary>Constructs a new Update request.</summary>
            public UpdateRequest(Google.Apis.Services.IClientService service, Google.Apis.Bigquery.v2.Data.Dataset body, string projectId, string datasetId)
                : base(service)
            {
                ProjectId = projectId;
                DatasetId = datasetId;
                Body = body;
                InitParameters();
            }


            /// <summary>Project ID of the dataset being updated</summary>
            [Google.Apis.Util.RequestParameterAttribute("projectId", Google.Apis.Util.RequestParameterType.Path)]
            public virtual string ProjectId { get; private set; }

            /// <summary>Dataset ID of the dataset being updated</summary>
            [Google.Apis.Util.RequestParameterAttribute("datasetId", Google.Apis.Util.RequestParameterType.Path)]
            public virtual string DatasetId { get; private set; }


            /// <summary>Gets or sets the body of this request.</summary>
            Google.Apis.Bigquery.v2.Data.Dataset Body { get; set; }

            ///<summary>Returns the body of the request.</summary>
            protected override object GetBody() { return Body; }

            ///<summary>Gets the method name.</summary>
            public override string MethodName
            {
                get { return "update"; }
            }

            ///<summary>Gets the HTTP method.</summary>
            public override string HttpMethod
            {
                get { return "PUT"; }
            }

            ///<summary>Gets the REST path.</summary>
            public override string RestPath
            {
                get { return "projects/{projectId}/datasets/{datasetId}"; }
            }

            /// <summary>Initializes Update parameter list.</summary>
            protected override void InitParameters()
            {
                base.InitParameters();

                RequestParameters.Add(
                    "projectId", new Google.Apis.Discovery.Parameter
                    {
                        Name = "projectId",
                        IsRequired = true,
                        ParameterType = "path",
                        DefaultValue = null,
                        Pattern = null,
                    });
                RequestParameters.Add(
                    "datasetId", new Google.Apis.Discovery.Parameter
                    {
                        Name = "datasetId",
                        IsRequired = true,
                        ParameterType = "path",
                        DefaultValue = null,
                        Pattern = null,
                    });
            }

        }
    }

    /// <summary>The "jobs" collection of methods.</summary>
    public class JobsResource
    {
        private const string Resource = "jobs";

        /// <summary>The service which this resource belongs to.</summary>
        private readonly Google.Apis.Services.IClientService service;

        /// <summary>Constructs a new resource.</summary>
        public JobsResource(Google.Apis.Services.IClientService service)
        {
            this.service = service;

        }


        /// <summary>Requests that a job be cancelled. This call will return immediately, and the client will need to
        /// poll for the job status to see if the cancel completed successfully. Cancelled jobs may still incur
        /// costs.</summary>
        /// <param name="projectId">[Required] Project ID of the job to cancel</param>
        /// <param name="jobId">[Required]
        /// Job ID of the job to cancel</param>
        public virtual CancelRequest Cancel(string projectId, string jobId)
        {
            return new CancelRequest(service, projectId, jobId);
        }

        /// <summary>Requests that a job be cancelled. This call will return immediately, and the client will need to
        /// poll for the job status to see if the cancel completed successfully. Cancelled jobs may still incur
        /// costs.</summary>
        public class CancelRequest : BigqueryBaseServiceRequest<Google.Apis.Bigquery.v2.Data.JobCancelResponse>
        {
            /// <summary>Constructs a new Cancel request.</summary>
            public CancelRequest(Google.Apis.Services.IClientService service, string projectId, string jobId)
                : base(service)
            {
                ProjectId = projectId;
                JobId = jobId;
                InitParameters();
            }


            /// <summary>[Required] Project ID of the job to cancel</summary>
            [Google.Apis.Util.RequestParameterAttribute("projectId", Google.Apis.Util.RequestParameterType.Path)]
            public virtual string ProjectId { get; private set; }

            /// <summary>[Required] Job ID of the job to cancel</summary>
            [Google.Apis.Util.RequestParameterAttribute("jobId", Google.Apis.Util.RequestParameterType.Path)]
            public virtual string JobId { get; private set; }


            ///<summary>Gets the method name.</summary>
            public override string MethodName
            {
                get { return "cancel"; }
            }

            ///<summary>Gets the HTTP method.</summary>
            public override string HttpMethod
            {
                get { return "POST"; }
            }

            ///<summary>Gets the REST path.</summary>
            public override string RestPath
            {
                get { return "projects/{projectId}/jobs/{jobId}/cancel"; }
            }

            /// <summary>Initializes Cancel parameter list.</summary>
            protected override void InitParameters()
            {
                base.InitParameters();

                RequestParameters.Add(
                    "projectId", new Google.Apis.Discovery.Parameter
                    {
                        Name = "projectId",
                        IsRequired = true,
                        ParameterType = "path",
                        DefaultValue = null,
                        Pattern = null,
                    });
                RequestParameters.Add(
                    "jobId", new Google.Apis.Discovery.Parameter
                    {
                        Name = "jobId",
                        IsRequired = true,
                        ParameterType = "path",
                        DefaultValue = null,
                        Pattern = null,
                    });
            }

        }

        /// <summary>Returns information about a specific job. Job information is available for a six month period after
        /// creation. Requires that you're the person who ran the job, or have the Is Owner project role.</summary>
        /// <param name="projectId">[Required] Project ID of the requested job</param>
        /// <param name="jobId">[Required]
        /// Job ID of the requested job</param>
        public virtual GetRequest Get(string projectId, string jobId)
        {
            return new GetRequest(service, projectId, jobId);
        }

        /// <summary>Returns information about a specific job. Job information is available for a six month period after
        /// creation. Requires that you're the person who ran the job, or have the Is Owner project role.</summary>
        public class GetRequest : BigqueryBaseServiceRequest<Google.Apis.Bigquery.v2.Data.Job>
        {
            /// <summary>Constructs a new Get request.</summary>
            public GetRequest(Google.Apis.Services.IClientService service, string projectId, string jobId)
                : base(service)
            {
                ProjectId = projectId;
                JobId = jobId;
                InitParameters();
            }


            /// <summary>[Required] Project ID of the requested job</summary>
            [Google.Apis.Util.RequestParameterAttribute("projectId", Google.Apis.Util.RequestParameterType.Path)]
            public virtual string ProjectId { get; private set; }

            /// <summary>[Required] Job ID of the requested job</summary>
            [Google.Apis.Util.RequestParameterAttribute("jobId", Google.Apis.Util.RequestParameterType.Path)]
            public virtual string JobId { get; private set; }


            ///<summary>Gets the method name.</summary>
            public override string MethodName
            {
                get { return "get"; }
            }

            ///<summary>Gets the HTTP method.</summary>
            public override string HttpMethod
            {
                get { return "GET"; }
            }

            ///<summary>Gets the REST path.</summary>
            public override string RestPath
            {
                get { return "projects/{projectId}/jobs/{jobId}"; }
            }

            /// <summary>Initializes Get parameter list.</summary>
            protected override void InitParameters()
            {
                base.InitParameters();

                RequestParameters.Add(
                    "projectId", new Google.Apis.Discovery.Parameter
                    {
                        Name = "projectId",
                        IsRequired = true,
                        ParameterType = "path",
                        DefaultValue = null,
                        Pattern = null,
                    });
                RequestParameters.Add(
                    "jobId", new Google.Apis.Discovery.Parameter
                    {
                        Name = "jobId",
                        IsRequired = true,
                        ParameterType = "path",
                        DefaultValue = null,
                        Pattern = null,
                    });
            }

        }

        /// <summary>Retrieves the results of a query job.</summary>
        /// <param name="projectId">[Required] Project ID of the query job</param>
        /// <param name="jobId">[Required] Job ID
        /// of the query job</param>
        public virtual GetQueryResultsRequest GetQueryResults(string projectId, string jobId)
        {
            return new GetQueryResultsRequest(service, projectId, jobId);
        }

        /// <summary>Retrieves the results of a query job.</summary>
        public class GetQueryResultsRequest : BigqueryBaseServiceRequest<Google.Apis.Bigquery.v2.Data.GetQueryResultsResponse>
        {
            /// <summary>Constructs a new GetQueryResults request.</summary>
            public GetQueryResultsRequest(Google.Apis.Services.IClientService service, string projectId, string jobId)
                : base(service)
            {
                ProjectId = projectId;
                JobId = jobId;
                InitParameters();
            }


            /// <summary>[Required] Project ID of the query job</summary>
            [Google.Apis.Util.RequestParameterAttribute("projectId", Google.Apis.Util.RequestParameterType.Path)]
            public virtual string ProjectId { get; private set; }

            /// <summary>[Required] Job ID of the query job</summary>
            [Google.Apis.Util.RequestParameterAttribute("jobId", Google.Apis.Util.RequestParameterType.Path)]
            public virtual string JobId { get; private set; }

            /// <summary>Maximum number of results to read</summary>
            [Google.Apis.Util.RequestParameterAttribute("maxResults", Google.Apis.Util.RequestParameterType.Query)]
            public virtual System.Nullable<long> MaxResults { get; set; }

            /// <summary>Page token, returned by a previous call, to request the next page of results</summary>
            [Google.Apis.Util.RequestParameterAttribute("pageToken", Google.Apis.Util.RequestParameterType.Query)]
            public virtual string PageToken { get; set; }

            /// <summary>Zero-based index of the starting row</summary>
            [Google.Apis.Util.RequestParameterAttribute("startIndex", Google.Apis.Util.RequestParameterType.Query)]
            public virtual System.Nullable<ulong> StartIndex { get; set; }

            /// <summary>How long to wait for the query to complete, in milliseconds, before returning. Default is 10
            /// seconds. If the timeout passes before the job completes, the 'jobComplete' field in the response will be
            /// false</summary>
            [Google.Apis.Util.RequestParameterAttribute("timeoutMs", Google.Apis.Util.RequestParameterType.Query)]
            public virtual System.Nullable<long> TimeoutMs { get; set; }


            ///<summary>Gets the method name.</summary>
            public override string MethodName
            {
                get { return "getQueryResults"; }
            }

            ///<summary>Gets the HTTP method.</summary>
            public override string HttpMethod
            {
                get { return "GET"; }
            }

            ///<summary>Gets the REST path.</summary>
            public override string RestPath
            {
                get { return "projects/{projectId}/queries/{jobId}"; }
            }

            /// <summary>Initializes GetQueryResults parameter list.</summary>
            protected override void InitParameters()
            {
                base.InitParameters();

                RequestParameters.Add(
                    "projectId", new Google.Apis.Discovery.Parameter
                    {
                        Name = "projectId",
                        IsRequired = true,
                        ParameterType = "path",
                        DefaultValue = null,
                        Pattern = null,
                    });
                RequestParameters.Add(
                    "jobId", new Google.Apis.Discovery.Parameter
                    {
                        Name = "jobId",
                        IsRequired = true,
                        ParameterType = "path",
                        DefaultValue = null,
                        Pattern = null,
                    });
                RequestParameters.Add(
                    "maxResults", new Google.Apis.Discovery.Parameter
                    {
                        Name = "maxResults",
                        IsRequired = false,
                        ParameterType = "query",
                        DefaultValue = null,
                        Pattern = null,
                    });
                RequestParameters.Add(
                    "pageToken", new Google.Apis.Discovery.Parameter
                    {
                        Name = "pageToken",
                        IsRequired = false,
                        ParameterType = "query",
                        DefaultValue = null,
                        Pattern = null,
                    });
                RequestParameters.Add(
                    "startIndex", new Google.Apis.Discovery.Parameter
                    {
                        Name = "startIndex",
                        IsRequired = false,
                        ParameterType = "query",
                        DefaultValue = null,
                        Pattern = null,
                    });
                RequestParameters.Add(
                    "timeoutMs", new Google.Apis.Discovery.Parameter
                    {
                        Name = "timeoutMs",
                        IsRequired = false,
                        ParameterType = "query",
                        DefaultValue = null,
                        Pattern = null,
                    });
            }

        }

        /// <summary>Starts a new asynchronous job. Requires the Can View project role.</summary>
        /// <param name="body">The body of the request.</param>
        /// <param name="projectId">Project ID of the project that will be billed for the job</param>
        public virtual InsertRequest Insert(Google.Apis.Bigquery.v2.Data.Job body, string projectId)
        {
            return new InsertRequest(service, body, projectId);
        }

        /// <summary>Starts a new asynchronous job. Requires the Can View project role.</summary>
        public class InsertRequest : BigqueryBaseServiceRequest<Google.Apis.Bigquery.v2.Data.Job>
        {
            /// <summary>Constructs a new Insert request.</summary>
            public InsertRequest(Google.Apis.Services.IClientService service, Google.Apis.Bigquery.v2.Data.Job body, string projectId)
                : base(service)
            {
                ProjectId = projectId;
                Body = body;
                InitParameters();
            }


            /// <summary>Project ID of the project that will be billed for the job</summary>
            [Google.Apis.Util.RequestParameterAttribute("projectId", Google.Apis.Util.RequestParameterType.Path)]
            public virtual string ProjectId { get; private set; }


            /// <summary>Gets or sets the body of this request.</summary>
            Google.Apis.Bigquery.v2.Data.Job Body { get; set; }

            ///<summary>Returns the body of the request.</summary>
            protected override object GetBody() { return Body; }

            ///<summary>Gets the method name.</summary>
            public override string MethodName
            {
                get { return "insert"; }
            }

            ///<summary>Gets the HTTP method.</summary>
            public override string HttpMethod
            {
                get { return "POST"; }
            }

            ///<summary>Gets the REST path.</summary>
            public override string RestPath
            {
                get { return "projects/{projectId}/jobs"; }
            }

            /// <summary>Initializes Insert parameter list.</summary>
            protected override void InitParameters()
            {
                base.InitParameters();

                RequestParameters.Add(
                    "projectId", new Google.Apis.Discovery.Parameter
                    {
                        Name = "projectId",
                        IsRequired = true,
                        ParameterType = "path",
                        DefaultValue = null,
                        Pattern = null,
                    });
            }

        }

        /// <summary>Starts a new asynchronous job. Requires the Can View project role.</summary>
        /// <param name="body">The body of the request.</param>
        /// <param name="projectId">Project ID of the project that will be billed for the job</param>
        /// <param name="stream">The stream to upload.</param>
        /// <param name="contentType">The content type of the stream to upload.</param>
        public virtual InsertMediaUpload Insert(Google.Apis.Bigquery.v2.Data.Job body, string projectId, System.IO.Stream stream, string contentType)
        {
            return new InsertMediaUpload(service, body, projectId, stream, contentType);
        }

        /// <summary>Insert media upload which supports resumable upload.</summary>
        public class InsertMediaUpload : Google.Apis.Upload.ResumableUpload<Google.Apis.Bigquery.v2.Data.Job, Google.Apis.Bigquery.v2.Data.Job>
        {

            /// <summary>Data format for the response.</summary>
            /// [default: json]
            [Google.Apis.Util.RequestParameterAttribute("alt", Google.Apis.Util.RequestParameterType.Query)]
            public virtual System.Nullable<AltEnum> Alt { get; set; }

            /// <summary>Data format for the response.</summary>
            public enum AltEnum
            {
                /// <summary>Responses with Content-Type of application/json</summary>
                [Google.Apis.Util.StringValueAttribute("json")]
                Json,
            }

            /// <summary>Selector specifying which fields to include in a partial response.</summary>
            [Google.Apis.Util.RequestParameterAttribute("fields", Google.Apis.Util.RequestParameterType.Query)]
            public virtual string Fields { get; set; }

            /// <summary>API key. Your API key identifies your project and provides you with API access, quota, and
            /// reports. Required unless you provide an OAuth 2.0 token.</summary>
            [Google.Apis.Util.RequestParameterAttribute("key", Google.Apis.Util.RequestParameterType.Query)]
            public virtual string Key { get; set; }

            /// <summary>OAuth 2.0 token for the current user.</summary>
            [Google.Apis.Util.RequestParameterAttribute("oauth_token", Google.Apis.Util.RequestParameterType.Query)]
            public virtual string OauthToken { get; set; }

            /// <summary>Returns response with indentations and line breaks.</summary>
            /// [default: true]
            [Google.Apis.Util.RequestParameterAttribute("prettyPrint", Google.Apis.Util.RequestParameterType.Query)]
            public virtual System.Nullable<bool> PrettyPrint { get; set; }

            /// <summary>Available to use for quota purposes for server-side applications. Can be any arbitrary string
            /// assigned to a user, but should not exceed 40 characters. Overrides userIp if both are
            /// provided.</summary>
            [Google.Apis.Util.RequestParameterAttribute("quotaUser", Google.Apis.Util.RequestParameterType.Query)]
            public virtual string QuotaUser { get; set; }

            /// <summary>IP address of the site where the request originates. Use this if you want to enforce per-user
            /// limits.</summary>
            [Google.Apis.Util.RequestParameterAttribute("userIp", Google.Apis.Util.RequestParameterType.Query)]
            public virtual string UserIp { get; set; }


            /// <summary>Project ID of the project that will be billed for the job</summary>
            [Google.Apis.Util.RequestParameterAttribute("projectId", Google.Apis.Util.RequestParameterType.Path)]
            public virtual string ProjectId { get; private set; }

            /// <summary>Constructs a new Insert media upload instance.</summary>
            public InsertMediaUpload(Google.Apis.Services.IClientService service, Google.Apis.Bigquery.v2.Data.Job body, string
             projectId, System.IO.Stream stream, string contentType)
                : base(service, string.Format("/{0}/{1}{2}", "upload", service.BasePath, "projects/{projectId}/jobs"), "POST", stream, contentType)
            {
                ProjectId = projectId;
                Body = body;
            }
        }

        /// <summary>Lists all jobs that you started in the specified project. Job information is available for a six
        /// month period after creation. The job list is sorted in reverse chronological order, by job creation time.
        /// Requires the Can View project role, or the Is Owner project role if you set the allUsers property.</summary>
        /// <param name="projectId">Project ID of the jobs to list</param>
        public virtual ListRequest List(string projectId)
        {
            return new ListRequest(service, projectId);
        }

        /// <summary>Lists all jobs that you started in the specified project. Job information is available for a six
        /// month period after creation. The job list is sorted in reverse chronological order, by job creation time.
        /// Requires the Can View project role, or the Is Owner project role if you set the allUsers property.</summary>
        public class ListRequest : BigqueryBaseServiceRequest<Google.Apis.Bigquery.v2.Data.JobList>
        {
            /// <summary>Constructs a new List request.</summary>
            public ListRequest(Google.Apis.Services.IClientService service, string projectId)
                : base(service)
            {
                ProjectId = projectId;
                InitParameters();
            }


            /// <summary>Project ID of the jobs to list</summary>
            [Google.Apis.Util.RequestParameterAttribute("projectId", Google.Apis.Util.RequestParameterType.Path)]
            public virtual string ProjectId { get; private set; }

            /// <summary>Whether to display jobs owned by all users in the project. Default false</summary>
            [Google.Apis.Util.RequestParameterAttribute("allUsers", Google.Apis.Util.RequestParameterType.Query)]
            public virtual System.Nullable<bool> AllUsers { get; set; }

            /// <summary>Maximum number of results to return</summary>
            [Google.Apis.Util.RequestParameterAttribute("maxResults", Google.Apis.Util.RequestParameterType.Query)]
            public virtual System.Nullable<long> MaxResults { get; set; }

            /// <summary>Page token, returned by a previous call, to request the next page of results</summary>
            [Google.Apis.Util.RequestParameterAttribute("pageToken", Google.Apis.Util.RequestParameterType.Query)]
            public virtual string PageToken { get; set; }

            /// <summary>Restrict information returned to a set of selected fields</summary>
            [Google.Apis.Util.RequestParameterAttribute("projection", Google.Apis.Util.RequestParameterType.Query)]
            public virtual System.Nullable<ProjectionEnum> Projection { get; set; }

            /// <summary>Restrict information returned to a set of selected fields</summary>
            public enum ProjectionEnum
            {
                /// <summary>Includes all job data</summary>
                [Google.Apis.Util.StringValueAttribute("full")]
                Full,
                /// <summary>Does not include the job configuration</summary>
                [Google.Apis.Util.StringValueAttribute("minimal")]
                Minimal,
            }

            /// <summary>Filter for job state</summary>
            [Google.Apis.Util.RequestParameterAttribute("stateFilter", Google.Apis.Util.RequestParameterType.Query)]
            public virtual System.Nullable<StateFilterEnum> StateFilter { get; set; }

            /// <summary>Filter for job state</summary>
            public enum StateFilterEnum
            {
                /// <summary>Finished jobs</summary>
                [Google.Apis.Util.StringValueAttribute("done")]
                Done,
                /// <summary>Pending jobs</summary>
                [Google.Apis.Util.StringValueAttribute("pending")]
                Pending,
                /// <summary>Running jobs</summary>
                [Google.Apis.Util.StringValueAttribute("running")]
                Running,
            }


            ///<summary>Gets the method name.</summary>
            public override string MethodName
            {
                get { return "list"; }
            }

            ///<summary>Gets the HTTP method.</summary>
            public override string HttpMethod
            {
                get { return "GET"; }
            }

            ///<summary>Gets the REST path.</summary>
            public override string RestPath
            {
                get { return "projects/{projectId}/jobs"; }
            }

            /// <summary>Initializes List parameter list.</summary>
            protected override void InitParameters()
            {
                base.InitParameters();

                RequestParameters.Add(
                    "projectId", new Google.Apis.Discovery.Parameter
                    {
                        Name = "projectId",
                        IsRequired = true,
                        ParameterType = "path",
                        DefaultValue = null,
                        Pattern = null,
                    });
                RequestParameters.Add(
                    "allUsers", new Google.Apis.Discovery.Parameter
                    {
                        Name = "allUsers",
                        IsRequired = false,
                        ParameterType = "query",
                        DefaultValue = null,
                        Pattern = null,
                    });
                RequestParameters.Add(
                    "maxResults", new Google.Apis.Discovery.Parameter
                    {
                        Name = "maxResults",
                        IsRequired = false,
                        ParameterType = "query",
                        DefaultValue = null,
                        Pattern = null,
                    });
                RequestParameters.Add(
                    "pageToken", new Google.Apis.Discovery.Parameter
                    {
                        Name = "pageToken",
                        IsRequired = false,
                        ParameterType = "query",
                        DefaultValue = null,
                        Pattern = null,
                    });
                RequestParameters.Add(
                    "projection", new Google.Apis.Discovery.Parameter
                    {
                        Name = "projection",
                        IsRequired = false,
                        ParameterType = "query",
                        DefaultValue = null,
                        Pattern = null,
                    });
                RequestParameters.Add(
                    "stateFilter", new Google.Apis.Discovery.Parameter
                    {
                        Name = "stateFilter",
                        IsRequired = false,
                        ParameterType = "query",
                        DefaultValue = null,
                        Pattern = null,
                    });
            }

        }

        /// <summary>Runs a BigQuery SQL query synchronously and returns query results if the query completes within a
        /// specified timeout.</summary>
        /// <param name="body">The body of the request.</param>
        /// <param name="projectId">Project ID of the project billed for the query</param>
        public virtual QueryRequest Query(Google.Apis.Bigquery.v2.Data.QueryRequest body, string projectId)
        {
            return new QueryRequest(service, body, projectId);
        }

        /// <summary>Runs a BigQuery SQL query synchronously and returns query results if the query completes within a
        /// specified timeout.</summary>
        public class QueryRequest : BigqueryBaseServiceRequest<Google.Apis.Bigquery.v2.Data.QueryResponse>
        {
            /// <summary>Constructs a new Query request.</summary>
            public QueryRequest(Google.Apis.Services.IClientService service, Google.Apis.Bigquery.v2.Data.QueryRequest body, string projectId)
                : base(service)
            {
                ProjectId = projectId;
                Body = body;
                InitParameters();
            }


            /// <summary>Project ID of the project billed for the query</summary>
            [Google.Apis.Util.RequestParameterAttribute("projectId", Google.Apis.Util.RequestParameterType.Path)]
            public virtual string ProjectId { get; private set; }


            /// <summary>Gets or sets the body of this request.</summary>
            Google.Apis.Bigquery.v2.Data.QueryRequest Body { get; set; }

            ///<summary>Returns the body of the request.</summary>
            protected override object GetBody() { return Body; }

            ///<summary>Gets the method name.</summary>
            public override string MethodName
            {
                get { return "query"; }
            }

            ///<summary>Gets the HTTP method.</summary>
            public override string HttpMethod
            {
                get { return "POST"; }
            }

            ///<summary>Gets the REST path.</summary>
            public override string RestPath
            {
                get { return "projects/{projectId}/queries"; }
            }

            /// <summary>Initializes Query parameter list.</summary>
            protected override void InitParameters()
            {
                base.InitParameters();

                RequestParameters.Add(
                    "projectId", new Google.Apis.Discovery.Parameter
                    {
                        Name = "projectId",
                        IsRequired = true,
                        ParameterType = "path",
                        DefaultValue = null,
                        Pattern = null,
                    });
            }

        }
    }

    /// <summary>The "projects" collection of methods.</summary>
    public class ProjectsResource
    {
        private const string Resource = "projects";

        /// <summary>The service which this resource belongs to.</summary>
        private readonly Google.Apis.Services.IClientService service;

        /// <summary>Constructs a new resource.</summary>
        public ProjectsResource(Google.Apis.Services.IClientService service)
        {
            this.service = service;

        }


        /// <summary>Lists all projects to which you have been granted any project role.</summary>
        public virtual ListRequest List()
        {
            return new ListRequest(service);
        }

        /// <summary>Lists all projects to which you have been granted any project role.</summary>
        public class ListRequest : BigqueryBaseServiceRequest<Google.Apis.Bigquery.v2.Data.ProjectList>
        {
            /// <summary>Constructs a new List request.</summary>
            public ListRequest(Google.Apis.Services.IClientService service)
                : base(service)
            {
                InitParameters();
            }


            /// <summary>Maximum number of results to return</summary>
            [Google.Apis.Util.RequestParameterAttribute("maxResults", Google.Apis.Util.RequestParameterType.Query)]
            public virtual System.Nullable<long> MaxResults { get; set; }

            /// <summary>Page token, returned by a previous call, to request the next page of results</summary>
            [Google.Apis.Util.RequestParameterAttribute("pageToken", Google.Apis.Util.RequestParameterType.Query)]
            public virtual string PageToken { get; set; }


            ///<summary>Gets the method name.</summary>
            public override string MethodName
            {
                get { return "list"; }
            }

            ///<summary>Gets the HTTP method.</summary>
            public override string HttpMethod
            {
                get { return "GET"; }
            }

            ///<summary>Gets the REST path.</summary>
            public override string RestPath
            {
                get { return "projects"; }
            }

            /// <summary>Initializes List parameter list.</summary>
            protected override void InitParameters()
            {
                base.InitParameters();

                RequestParameters.Add(
                    "maxResults", new Google.Apis.Discovery.Parameter
                    {
                        Name = "maxResults",
                        IsRequired = false,
                        ParameterType = "query",
                        DefaultValue = null,
                        Pattern = null,
                    });
                RequestParameters.Add(
                    "pageToken", new Google.Apis.Discovery.Parameter
                    {
                        Name = "pageToken",
                        IsRequired = false,
                        ParameterType = "query",
                        DefaultValue = null,
                        Pattern = null,
                    });
            }

        }
    }

    /// <summary>The "tabledata" collection of methods.</summary>
    public class TabledataResource
    {
        private const string Resource = "tabledata";

        /// <summary>The service which this resource belongs to.</summary>
        private readonly Google.Apis.Services.IClientService service;

        /// <summary>Constructs a new resource.</summary>
        public TabledataResource(Google.Apis.Services.IClientService service)
        {
            this.service = service;

        }


        /// <summary>Streams data into BigQuery one record at a time without needing to run a load job. Requires the
        /// WRITER dataset role.</summary>
        /// <param name="body">The body of the request.</param>
        /// <param name="projectId">Project ID of the destination table.</param>
        /// <param name="datasetId">Dataset ID of
        /// the destination table.</param>
        /// <param name="tableId">Table ID of the destination table.</param>
        public virtual InsertAllRequest InsertAll(Google.Apis.Bigquery.v2.Data.TableDataInsertAllRequest body, string projectId, string datasetId, string tableId)
        {
            return new InsertAllRequest(service, body, projectId, datasetId, tableId);
        }

        /// <summary>Streams data into BigQuery one record at a time without needing to run a load job. Requires the
        /// WRITER dataset role.</summary>
        public class InsertAllRequest : BigqueryBaseServiceRequest<Google.Apis.Bigquery.v2.Data.TableDataInsertAllResponse>
        {
            /// <summary>Constructs a new InsertAll request.</summary>
            public InsertAllRequest(Google.Apis.Services.IClientService service, Google.Apis.Bigquery.v2.Data.TableDataInsertAllRequest body, string projectId, string datasetId, string tableId)
                : base(service)
            {
                ProjectId = projectId;
                DatasetId = datasetId;
                TableId = tableId;
                Body = body;
                InitParameters();
            }


            /// <summary>Project ID of the destination table.</summary>
            [Google.Apis.Util.RequestParameterAttribute("projectId", Google.Apis.Util.RequestParameterType.Path)]
            public virtual string ProjectId { get; private set; }

            /// <summary>Dataset ID of the destination table.</summary>
            [Google.Apis.Util.RequestParameterAttribute("datasetId", Google.Apis.Util.RequestParameterType.Path)]
            public virtual string DatasetId { get; private set; }

            /// <summary>Table ID of the destination table.</summary>
            [Google.Apis.Util.RequestParameterAttribute("tableId", Google.Apis.Util.RequestParameterType.Path)]
            public virtual string TableId { get; private set; }


            /// <summary>Gets or sets the body of this request.</summary>
            Google.Apis.Bigquery.v2.Data.TableDataInsertAllRequest Body { get; set; }

            ///<summary>Returns the body of the request.</summary>
            protected override object GetBody() { return Body; }

            ///<summary>Gets the method name.</summary>
            public override string MethodName
            {
                get { return "insertAll"; }
            }

            ///<summary>Gets the HTTP method.</summary>
            public override string HttpMethod
            {
                get { return "POST"; }
            }

            ///<summary>Gets the REST path.</summary>
            public override string RestPath
            {
                get { return "projects/{projectId}/datasets/{datasetId}/tables/{tableId}/insertAll"; }
            }

            /// <summary>Initializes InsertAll parameter list.</summary>
            protected override void InitParameters()
            {
                base.InitParameters();

                RequestParameters.Add(
                    "projectId", new Google.Apis.Discovery.Parameter
                    {
                        Name = "projectId",
                        IsRequired = true,
                        ParameterType = "path",
                        DefaultValue = null,
                        Pattern = null,
                    });
                RequestParameters.Add(
                    "datasetId", new Google.Apis.Discovery.Parameter
                    {
                        Name = "datasetId",
                        IsRequired = true,
                        ParameterType = "path",
                        DefaultValue = null,
                        Pattern = null,
                    });
                RequestParameters.Add(
                    "tableId", new Google.Apis.Discovery.Parameter
                    {
                        Name = "tableId",
                        IsRequired = true,
                        ParameterType = "path",
                        DefaultValue = null,
                        Pattern = null,
                    });
            }

        }

        /// <summary>Retrieves table data from a specified set of rows. Requires the READER dataset role.</summary>
        /// <param name="projectId">Project ID of the table to read</param>
        /// <param name="datasetId">Dataset ID of the
        /// table to read</param>
        /// <param name="tableId">Table ID of the table to read</param>
        public virtual ListRequest List(string projectId, string datasetId, string tableId)
        {
            return new ListRequest(service, projectId, datasetId, tableId);
        }

        /// <summary>Retrieves table data from a specified set of rows. Requires the READER dataset role.</summary>
        public class ListRequest : BigqueryBaseServiceRequest<Google.Apis.Bigquery.v2.Data.TableDataList>
        {
            /// <summary>Constructs a new List request.</summary>
            public ListRequest(Google.Apis.Services.IClientService service, string projectId, string datasetId, string tableId)
                : base(service)
            {
                ProjectId = projectId;
                DatasetId = datasetId;
                TableId = tableId;
                InitParameters();
            }


            /// <summary>Project ID of the table to read</summary>
            [Google.Apis.Util.RequestParameterAttribute("projectId", Google.Apis.Util.RequestParameterType.Path)]
            public virtual string ProjectId { get; private set; }

            /// <summary>Dataset ID of the table to read</summary>
            [Google.Apis.Util.RequestParameterAttribute("datasetId", Google.Apis.Util.RequestParameterType.Path)]
            public virtual string DatasetId { get; private set; }

            /// <summary>Table ID of the table to read</summary>
            [Google.Apis.Util.RequestParameterAttribute("tableId", Google.Apis.Util.RequestParameterType.Path)]
            public virtual string TableId { get; private set; }

            /// <summary>Maximum number of results to return</summary>
            [Google.Apis.Util.RequestParameterAttribute("maxResults", Google.Apis.Util.RequestParameterType.Query)]
            public virtual System.Nullable<long> MaxResults { get; set; }

            /// <summary>Page token, returned by a previous call, identifying the result set</summary>
            [Google.Apis.Util.RequestParameterAttribute("pageToken", Google.Apis.Util.RequestParameterType.Query)]
            public virtual string PageToken { get; set; }

            /// <summary>List of fields to return (comma-separated). If unspecified, all fields are returned</summary>
            [Google.Apis.Util.RequestParameterAttribute("selectedFields", Google.Apis.Util.RequestParameterType.Query)]
            public virtual string SelectedFields { get; set; }

            /// <summary>Zero-based index of the starting row to read</summary>
            [Google.Apis.Util.RequestParameterAttribute("startIndex", Google.Apis.Util.RequestParameterType.Query)]
            public virtual System.Nullable<ulong> StartIndex { get; set; }


            ///<summary>Gets the method name.</summary>
            public override string MethodName
            {
                get { return "list"; }
            }

            ///<summary>Gets the HTTP method.</summary>
            public override string HttpMethod
            {
                get { return "GET"; }
            }

            ///<summary>Gets the REST path.</summary>
            public override string RestPath
            {
                get { return "projects/{projectId}/datasets/{datasetId}/tables/{tableId}/data"; }
            }

            /// <summary>Initializes List parameter list.</summary>
            protected override void InitParameters()
            {
                base.InitParameters();

                RequestParameters.Add(
                    "projectId", new Google.Apis.Discovery.Parameter
                    {
                        Name = "projectId",
                        IsRequired = true,
                        ParameterType = "path",
                        DefaultValue = null,
                        Pattern = null,
                    });
                RequestParameters.Add(
                    "datasetId", new Google.Apis.Discovery.Parameter
                    {
                        Name = "datasetId",
                        IsRequired = true,
                        ParameterType = "path",
                        DefaultValue = null,
                        Pattern = null,
                    });
                RequestParameters.Add(
                    "tableId", new Google.Apis.Discovery.Parameter
                    {
                        Name = "tableId",
                        IsRequired = true,
                        ParameterType = "path",
                        DefaultValue = null,
                        Pattern = null,
                    });
                RequestParameters.Add(
                    "maxResults", new Google.Apis.Discovery.Parameter
                    {
                        Name = "maxResults",
                        IsRequired = false,
                        ParameterType = "query",
                        DefaultValue = null,
                        Pattern = null,
                    });
                RequestParameters.Add(
                    "pageToken", new Google.Apis.Discovery.Parameter
                    {
                        Name = "pageToken",
                        IsRequired = false,
                        ParameterType = "query",
                        DefaultValue = null,
                        Pattern = null,
                    });
                RequestParameters.Add(
                    "selectedFields", new Google.Apis.Discovery.Parameter
                    {
                        Name = "selectedFields",
                        IsRequired = false,
                        ParameterType = "query",
                        DefaultValue = null,
                        Pattern = null,
                    });
                RequestParameters.Add(
                    "startIndex", new Google.Apis.Discovery.Parameter
                    {
                        Name = "startIndex",
                        IsRequired = false,
                        ParameterType = "query",
                        DefaultValue = null,
                        Pattern = null,
                    });
            }

        }
    }

    /// <summary>The "tables" collection of methods.</summary>
    public class TablesResource
    {
        private const string Resource = "tables";

        /// <summary>The service which this resource belongs to.</summary>
        private readonly Google.Apis.Services.IClientService service;

        /// <summary>Constructs a new resource.</summary>
        public TablesResource(Google.Apis.Services.IClientService service)
        {
            this.service = service;

        }


        /// <summary>Deletes the table specified by tableId from the dataset. If the table contains data, all the data
        /// will be deleted.</summary>
        /// <param name="projectId">Project ID of the table to delete</param>
        /// <param name="datasetId">Dataset ID of the
        /// table to delete</param>
        /// <param name="tableId">Table ID of the table to delete</param>
        public virtual DeleteRequest Delete(string projectId, string datasetId, string tableId)
        {
            return new DeleteRequest(service, projectId, datasetId, tableId);
        }

        /// <summary>Deletes the table specified by tableId from the dataset. If the table contains data, all the data
        /// will be deleted.</summary>
        public class DeleteRequest : BigqueryBaseServiceRequest<string>
        {
            /// <summary>Constructs a new Delete request.</summary>
            public DeleteRequest(Google.Apis.Services.IClientService service, string projectId, string datasetId, string tableId)
                : base(service)
            {
                ProjectId = projectId;
                DatasetId = datasetId;
                TableId = tableId;
                InitParameters();
            }


            /// <summary>Project ID of the table to delete</summary>
            [Google.Apis.Util.RequestParameterAttribute("projectId", Google.Apis.Util.RequestParameterType.Path)]
            public virtual string ProjectId { get; private set; }

            /// <summary>Dataset ID of the table to delete</summary>
            [Google.Apis.Util.RequestParameterAttribute("datasetId", Google.Apis.Util.RequestParameterType.Path)]
            public virtual string DatasetId { get; private set; }

            /// <summary>Table ID of the table to delete</summary>
            [Google.Apis.Util.RequestParameterAttribute("tableId", Google.Apis.Util.RequestParameterType.Path)]
            public virtual string TableId { get; private set; }


            ///<summary>Gets the method name.</summary>
            public override string MethodName
            {
                get { return "delete"; }
            }

            ///<summary>Gets the HTTP method.</summary>
            public override string HttpMethod
            {
                get { return "DELETE"; }
            }

            ///<summary>Gets the REST path.</summary>
            public override string RestPath
            {
                get { return "projects/{projectId}/datasets/{datasetId}/tables/{tableId}"; }
            }

            /// <summary>Initializes Delete parameter list.</summary>
            protected override void InitParameters()
            {
                base.InitParameters();

                RequestParameters.Add(
                    "projectId", new Google.Apis.Discovery.Parameter
                    {
                        Name = "projectId",
                        IsRequired = true,
                        ParameterType = "path",
                        DefaultValue = null,
                        Pattern = null,
                    });
                RequestParameters.Add(
                    "datasetId", new Google.Apis.Discovery.Parameter
                    {
                        Name = "datasetId",
                        IsRequired = true,
                        ParameterType = "path",
                        DefaultValue = null,
                        Pattern = null,
                    });
                RequestParameters.Add(
                    "tableId", new Google.Apis.Discovery.Parameter
                    {
                        Name = "tableId",
                        IsRequired = true,
                        ParameterType = "path",
                        DefaultValue = null,
                        Pattern = null,
                    });
            }

        }

        /// <summary>Gets the specified table resource by table ID. This method does not return the data in the table,
        /// it only returns the table resource, which describes the structure of this table.</summary>
        /// <param name="projectId">Project ID of the requested table</param>
        /// <param name="datasetId">Dataset ID of the
        /// requested table</param>
        /// <param name="tableId">Table ID of the requested table</param>
        public virtual GetRequest Get(string projectId, string datasetId, string tableId)
        {
            return new GetRequest(service, projectId, datasetId, tableId);
        }

        /// <summary>Gets the specified table resource by table ID. This method does not return the data in the table,
        /// it only returns the table resource, which describes the structure of this table.</summary>
        public class GetRequest : BigqueryBaseServiceRequest<Google.Apis.Bigquery.v2.Data.Table>
        {
            /// <summary>Constructs a new Get request.</summary>
            public GetRequest(Google.Apis.Services.IClientService service, string projectId, string datasetId, string tableId)
                : base(service)
            {
                ProjectId = projectId;
                DatasetId = datasetId;
                TableId = tableId;
                InitParameters();
            }


            /// <summary>Project ID of the requested table</summary>
            [Google.Apis.Util.RequestParameterAttribute("projectId", Google.Apis.Util.RequestParameterType.Path)]
            public virtual string ProjectId { get; private set; }

            /// <summary>Dataset ID of the requested table</summary>
            [Google.Apis.Util.RequestParameterAttribute("datasetId", Google.Apis.Util.RequestParameterType.Path)]
            public virtual string DatasetId { get; private set; }

            /// <summary>Table ID of the requested table</summary>
            [Google.Apis.Util.RequestParameterAttribute("tableId", Google.Apis.Util.RequestParameterType.Path)]
            public virtual string TableId { get; private set; }

            /// <summary>List of fields to return (comma-separated). If unspecified, all fields are returned</summary>
            [Google.Apis.Util.RequestParameterAttribute("selectedFields", Google.Apis.Util.RequestParameterType.Query)]
            public virtual string SelectedFields { get; set; }


            ///<summary>Gets the method name.</summary>
            public override string MethodName
            {
                get { return "get"; }
            }

            ///<summary>Gets the HTTP method.</summary>
            public override string HttpMethod
            {
                get { return "GET"; }
            }

            ///<summary>Gets the REST path.</summary>
            public override string RestPath
            {
                get { return "projects/{projectId}/datasets/{datasetId}/tables/{tableId}"; }
            }

            /// <summary>Initializes Get parameter list.</summary>
            protected override void InitParameters()
            {
                base.InitParameters();

                RequestParameters.Add(
                    "projectId", new Google.Apis.Discovery.Parameter
                    {
                        Name = "projectId",
                        IsRequired = true,
                        ParameterType = "path",
                        DefaultValue = null,
                        Pattern = null,
                    });
                RequestParameters.Add(
                    "datasetId", new Google.Apis.Discovery.Parameter
                    {
                        Name = "datasetId",
                        IsRequired = true,
                        ParameterType = "path",
                        DefaultValue = null,
                        Pattern = null,
                    });
                RequestParameters.Add(
                    "tableId", new Google.Apis.Discovery.Parameter
                    {
                        Name = "tableId",
                        IsRequired = true,
                        ParameterType = "path",
                        DefaultValue = null,
                        Pattern = null,
                    });
                RequestParameters.Add(
                    "selectedFields", new Google.Apis.Discovery.Parameter
                    {
                        Name = "selectedFields",
                        IsRequired = false,
                        ParameterType = "query",
                        DefaultValue = null,
                        Pattern = null,
                    });
            }

        }

        /// <summary>Creates a new, empty table in the dataset.</summary>
        /// <param name="body">The body of the request.</param>
        /// <param name="projectId">Project ID of the new table</param>
        /// <param name="datasetId">Dataset ID of the new
        /// table</param>
        public virtual InsertRequest Insert(Google.Apis.Bigquery.v2.Data.Table body, string projectId, string datasetId)
        {
            return new InsertRequest(service, body, projectId, datasetId);
        }

        /// <summary>Creates a new, empty table in the dataset.</summary>
        public class InsertRequest : BigqueryBaseServiceRequest<Google.Apis.Bigquery.v2.Data.Table>
        {
            /// <summary>Constructs a new Insert request.</summary>
            public InsertRequest(Google.Apis.Services.IClientService service, Google.Apis.Bigquery.v2.Data.Table body, string projectId, string datasetId)
                : base(service)
            {
                ProjectId = projectId;
                DatasetId = datasetId;
                Body = body;
                InitParameters();
            }


            /// <summary>Project ID of the new table</summary>
            [Google.Apis.Util.RequestParameterAttribute("projectId", Google.Apis.Util.RequestParameterType.Path)]
            public virtual string ProjectId { get; private set; }

            /// <summary>Dataset ID of the new table</summary>
            [Google.Apis.Util.RequestParameterAttribute("datasetId", Google.Apis.Util.RequestParameterType.Path)]
            public virtual string DatasetId { get; private set; }


            /// <summary>Gets or sets the body of this request.</summary>
            Google.Apis.Bigquery.v2.Data.Table Body { get; set; }

            ///<summary>Returns the body of the request.</summary>
            protected override object GetBody() { return Body; }

            ///<summary>Gets the method name.</summary>
            public override string MethodName
            {
                get { return "insert"; }
            }

            ///<summary>Gets the HTTP method.</summary>
            public override string HttpMethod
            {
                get { return "POST"; }
            }

            ///<summary>Gets the REST path.</summary>
            public override string RestPath
            {
                get { return "projects/{projectId}/datasets/{datasetId}/tables"; }
            }

            /// <summary>Initializes Insert parameter list.</summary>
            protected override void InitParameters()
            {
                base.InitParameters();

                RequestParameters.Add(
                    "projectId", new Google.Apis.Discovery.Parameter
                    {
                        Name = "projectId",
                        IsRequired = true,
                        ParameterType = "path",
                        DefaultValue = null,
                        Pattern = null,
                    });
                RequestParameters.Add(
                    "datasetId", new Google.Apis.Discovery.Parameter
                    {
                        Name = "datasetId",
                        IsRequired = true,
                        ParameterType = "path",
                        DefaultValue = null,
                        Pattern = null,
                    });
            }

        }

        /// <summary>Lists all tables in the specified dataset. Requires the READER dataset role.</summary>
        /// <param name="projectId">Project ID of the tables to list</param>
        /// <param name="datasetId">Dataset ID of the
        /// tables to list</param>
        public virtual ListRequest List(string projectId, string datasetId)
        {
            return new ListRequest(service, projectId, datasetId);
        }

        /// <summary>Lists all tables in the specified dataset. Requires the READER dataset role.</summary>
        public class ListRequest : BigqueryBaseServiceRequest<Google.Apis.Bigquery.v2.Data.TableList>
        {
            /// <summary>Constructs a new List request.</summary>
            public ListRequest(Google.Apis.Services.IClientService service, string projectId, string datasetId)
                : base(service)
            {
                ProjectId = projectId;
                DatasetId = datasetId;
                InitParameters();
            }


            /// <summary>Project ID of the tables to list</summary>
            [Google.Apis.Util.RequestParameterAttribute("projectId", Google.Apis.Util.RequestParameterType.Path)]
            public virtual string ProjectId { get; private set; }

            /// <summary>Dataset ID of the tables to list</summary>
            [Google.Apis.Util.RequestParameterAttribute("datasetId", Google.Apis.Util.RequestParameterType.Path)]
            public virtual string DatasetId { get; private set; }

            /// <summary>Maximum number of results to return</summary>
            [Google.Apis.Util.RequestParameterAttribute("maxResults", Google.Apis.Util.RequestParameterType.Query)]
            public virtual System.Nullable<long> MaxResults { get; set; }

            /// <summary>Page token, returned by a previous call, to request the next page of results</summary>
            [Google.Apis.Util.RequestParameterAttribute("pageToken", Google.Apis.Util.RequestParameterType.Query)]
            public virtual string PageToken { get; set; }


            ///<summary>Gets the method name.</summary>
            public override string MethodName
            {
                get { return "list"; }
            }

            ///<summary>Gets the HTTP method.</summary>
            public override string HttpMethod
            {
                get { return "GET"; }
            }

            ///<summary>Gets the REST path.</summary>
            public override string RestPath
            {
                get { return "projects/{projectId}/datasets/{datasetId}/tables"; }
            }

            /// <summary>Initializes List parameter list.</summary>
            protected override void InitParameters()
            {
                base.InitParameters();

                RequestParameters.Add(
                    "projectId", new Google.Apis.Discovery.Parameter
                    {
                        Name = "projectId",
                        IsRequired = true,
                        ParameterType = "path",
                        DefaultValue = null,
                        Pattern = null,
                    });
                RequestParameters.Add(
                    "datasetId", new Google.Apis.Discovery.Parameter
                    {
                        Name = "datasetId",
                        IsRequired = true,
                        ParameterType = "path",
                        DefaultValue = null,
                        Pattern = null,
                    });
                RequestParameters.Add(
                    "maxResults", new Google.Apis.Discovery.Parameter
                    {
                        Name = "maxResults",
                        IsRequired = false,
                        ParameterType = "query",
                        DefaultValue = null,
                        Pattern = null,
                    });
                RequestParameters.Add(
                    "pageToken", new Google.Apis.Discovery.Parameter
                    {
                        Name = "pageToken",
                        IsRequired = false,
                        ParameterType = "query",
                        DefaultValue = null,
                        Pattern = null,
                    });
            }

        }

        /// <summary>Updates information in an existing table. The update method replaces the entire table resource,
        /// whereas the patch method only replaces fields that are provided in the submitted table resource. This method
        /// supports patch semantics.</summary>
        /// <param name="body">The body of the request.</param>
        /// <param name="projectId">Project ID of the table to update</param>
        /// <param name="datasetId">Dataset ID of the
        /// table to update</param>
        /// <param name="tableId">Table ID of the table to update</param>
        public virtual PatchRequest Patch(Google.Apis.Bigquery.v2.Data.Table body, string projectId, string datasetId, string tableId)
        {
            return new PatchRequest(service, body, projectId, datasetId, tableId);
        }

        /// <summary>Updates information in an existing table. The update method replaces the entire table resource,
        /// whereas the patch method only replaces fields that are provided in the submitted table resource. This method
        /// supports patch semantics.</summary>
        public class PatchRequest : BigqueryBaseServiceRequest<Google.Apis.Bigquery.v2.Data.Table>
        {
            /// <summary>Constructs a new Patch request.</summary>
            public PatchRequest(Google.Apis.Services.IClientService service, Google.Apis.Bigquery.v2.Data.Table body, string projectId, string datasetId, string tableId)
                : base(service)
            {
                ProjectId = projectId;
                DatasetId = datasetId;
                TableId = tableId;
                Body = body;
                InitParameters();
            }


            /// <summary>Project ID of the table to update</summary>
            [Google.Apis.Util.RequestParameterAttribute("projectId", Google.Apis.Util.RequestParameterType.Path)]
            public virtual string ProjectId { get; private set; }

            /// <summary>Dataset ID of the table to update</summary>
            [Google.Apis.Util.RequestParameterAttribute("datasetId", Google.Apis.Util.RequestParameterType.Path)]
            public virtual string DatasetId { get; private set; }

            /// <summary>Table ID of the table to update</summary>
            [Google.Apis.Util.RequestParameterAttribute("tableId", Google.Apis.Util.RequestParameterType.Path)]
            public virtual string TableId { get; private set; }


            /// <summary>Gets or sets the body of this request.</summary>
            Google.Apis.Bigquery.v2.Data.Table Body { get; set; }

            ///<summary>Returns the body of the request.</summary>
            protected override object GetBody() { return Body; }

            ///<summary>Gets the method name.</summary>
            public override string MethodName
            {
                get { return "patch"; }
            }

            ///<summary>Gets the HTTP method.</summary>
            public override string HttpMethod
            {
                get { return "PATCH"; }
            }

            ///<summary>Gets the REST path.</summary>
            public override string RestPath
            {
                get { return "projects/{projectId}/datasets/{datasetId}/tables/{tableId}"; }
            }

            /// <summary>Initializes Patch parameter list.</summary>
            protected override void InitParameters()
            {
                base.InitParameters();

                RequestParameters.Add(
                    "projectId", new Google.Apis.Discovery.Parameter
                    {
                        Name = "projectId",
                        IsRequired = true,
                        ParameterType = "path",
                        DefaultValue = null,
                        Pattern = null,
                    });
                RequestParameters.Add(
                    "datasetId", new Google.Apis.Discovery.Parameter
                    {
                        Name = "datasetId",
                        IsRequired = true,
                        ParameterType = "path",
                        DefaultValue = null,
                        Pattern = null,
                    });
                RequestParameters.Add(
                    "tableId", new Google.Apis.Discovery.Parameter
                    {
                        Name = "tableId",
                        IsRequired = true,
                        ParameterType = "path",
                        DefaultValue = null,
                        Pattern = null,
                    });
            }

        }

        /// <summary>Updates information in an existing table. The update method replaces the entire table resource,
        /// whereas the patch method only replaces fields that are provided in the submitted table resource.</summary>
        /// <param name="body">The body of the request.</param>
        /// <param name="projectId">Project ID of the table to update</param>
        /// <param name="datasetId">Dataset ID of the
        /// table to update</param>
        /// <param name="tableId">Table ID of the table to update</param>
        public virtual UpdateRequest Update(Google.Apis.Bigquery.v2.Data.Table body, string projectId, string datasetId, string tableId)
        {
            return new UpdateRequest(service, body, projectId, datasetId, tableId);
        }

        /// <summary>Updates information in an existing table. The update method replaces the entire table resource,
        /// whereas the patch method only replaces fields that are provided in the submitted table resource.</summary>
        public class UpdateRequest : BigqueryBaseServiceRequest<Google.Apis.Bigquery.v2.Data.Table>
        {
            /// <summary>Constructs a new Update request.</summary>
            public UpdateRequest(Google.Apis.Services.IClientService service, Google.Apis.Bigquery.v2.Data.Table body, string projectId, string datasetId, string tableId)
                : base(service)
            {
                ProjectId = projectId;
                DatasetId = datasetId;
                TableId = tableId;
                Body = body;
                InitParameters();
            }


            /// <summary>Project ID of the table to update</summary>
            [Google.Apis.Util.RequestParameterAttribute("projectId", Google.Apis.Util.RequestParameterType.Path)]
            public virtual string ProjectId { get; private set; }

            /// <summary>Dataset ID of the table to update</summary>
            [Google.Apis.Util.RequestParameterAttribute("datasetId", Google.Apis.Util.RequestParameterType.Path)]
            public virtual string DatasetId { get; private set; }

            /// <summary>Table ID of the table to update</summary>
            [Google.Apis.Util.RequestParameterAttribute("tableId", Google.Apis.Util.RequestParameterType.Path)]
            public virtual string TableId { get; private set; }


            /// <summary>Gets or sets the body of this request.</summary>
            Google.Apis.Bigquery.v2.Data.Table Body { get; set; }

            ///<summary>Returns the body of the request.</summary>
            protected override object GetBody() { return Body; }

            ///<summary>Gets the method name.</summary>
            public override string MethodName
            {
                get { return "update"; }
            }

            ///<summary>Gets the HTTP method.</summary>
            public override string HttpMethod
            {
                get { return "PUT"; }
            }

            ///<summary>Gets the REST path.</summary>
            public override string RestPath
            {
                get { return "projects/{projectId}/datasets/{datasetId}/tables/{tableId}"; }
            }

            /// <summary>Initializes Update parameter list.</summary>
            protected override void InitParameters()
            {
                base.InitParameters();

                RequestParameters.Add(
                    "projectId", new Google.Apis.Discovery.Parameter
                    {
                        Name = "projectId",
                        IsRequired = true,
                        ParameterType = "path",
                        DefaultValue = null,
                        Pattern = null,
                    });
                RequestParameters.Add(
                    "datasetId", new Google.Apis.Discovery.Parameter
                    {
                        Name = "datasetId",
                        IsRequired = true,
                        ParameterType = "path",
                        DefaultValue = null,
                        Pattern = null,
                    });
                RequestParameters.Add(
                    "tableId", new Google.Apis.Discovery.Parameter
                    {
                        Name = "tableId",
                        IsRequired = true,
                        ParameterType = "path",
                        DefaultValue = null,
                        Pattern = null,
                    });
            }

        }
    }
}

namespace Google.Apis.Bigquery.v2.Data
{    

    public class BigtableColumn : Google.Apis.Requests.IDirectResponseSchema
    {
        /// <summary>[Optional] The encoding of the values when the type is not STRING. Acceptable encoding values are:
        /// TEXT - indicates values are alphanumeric text strings. BINARY - indicates values are encoded using HBase
        /// Bytes.toBytes family of functions. 'encoding' can also be set at the column family level. However, the
        /// setting at this level takes precedence if 'encoding' is set at both levels.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("encoding")]
        public virtual string Encoding { get; set; } 

        /// <summary>[Optional] If the qualifier is not a valid BigQuery field identifier i.e. does not match
        /// [a-zA-Z][a-zA-Z0-9_]*, a valid identifier must be provided as the column field name and is used as field
        /// name in queries.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("fieldName")]
        public virtual string FieldName { get; set; } 

        /// <summary>[Optional] If this is set, only the latest version of value in this column are exposed.
        /// 'onlyReadLatest' can also be set at the column family level. However, the setting at this level takes
        /// precedence if 'onlyReadLatest' is set at both levels.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("onlyReadLatest")]
        public virtual System.Nullable<bool> OnlyReadLatest { get; set; } 

        /// <summary>[Required] Qualifier of the column. Columns in the parent column family that has this exact
        /// qualifier are exposed as . field. If the qualifier is valid UTF-8 string, it can be specified in the
        /// qualifier_string field. Otherwise, a base-64 encoded value must be set to qualifier_encoded. The column
        /// field name is the same as the column qualifier. However, if the qualifier is not a valid BigQuery field
        /// identifier i.e. does not match [a-zA-Z][a-zA-Z0-9_]*, a valid identifier must be provided as
        /// field_name.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("qualifierEncoded")]
        public virtual string QualifierEncoded { get; set; } 

        [Newtonsoft.Json.JsonPropertyAttribute("qualifierString")]
        public virtual string QualifierString { get; set; } 

        /// <summary>[Optional] The type to convert the value in cells of this column. The values are expected to be
        /// encoded using HBase Bytes.toBytes function when using the BINARY encoding value. Following BigQuery types
        /// are allowed (case-sensitive) - BYTES STRING INTEGER FLOAT BOOLEAN Default type is BYTES. 'type' can also be
        /// set at the column family level. However, the setting at this level takes precedence if 'type' is set at both
        /// levels.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("type")]
        public virtual string Type { get; set; } 

        /// <summary>The ETag of the item.</summary>
        public virtual string ETag { get; set; }
    }    

    public class BigtableColumnFamily : Google.Apis.Requests.IDirectResponseSchema
    {
        /// <summary>[Optional] Lists of columns that should be exposed as individual fields as opposed to a list of
        /// (column name, value) pairs. All columns whose qualifier matches a qualifier in this list can be accessed as
        /// .. Other columns can be accessed as a list through .Column field.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("columns")]
        public virtual System.Collections.Generic.IList<BigtableColumn> Columns { get; set; } 

        /// <summary>[Optional] The encoding of the values when the type is not STRING. Acceptable encoding values are:
        /// TEXT - indicates values are alphanumeric text strings. BINARY - indicates values are encoded using HBase
        /// Bytes.toBytes family of functions. This can be overridden for a specific column by listing that column in
        /// 'columns' and specifying an encoding for it.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("encoding")]
        public virtual string Encoding { get; set; } 

        /// <summary>Identifier of the column family.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("familyId")]
        public virtual string FamilyId { get; set; } 

        /// <summary>[Optional] If this is set only the latest version of value are exposed for all columns in this
        /// column family. This can be overridden for a specific column by listing that column in 'columns' and
        /// specifying a different setting for that column.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("onlyReadLatest")]
        public virtual System.Nullable<bool> OnlyReadLatest { get; set; } 

        /// <summary>[Optional] The type to convert the value in cells of this column family. The values are expected to
        /// be encoded using HBase Bytes.toBytes function when using the BINARY encoding value. Following BigQuery types
        /// are allowed (case-sensitive) - BYTES STRING INTEGER FLOAT BOOLEAN Default type is BYTES. This can be
        /// overridden for a specific column by listing that column in 'columns' and specifying a type for it.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("type")]
        public virtual string Type { get; set; } 

        /// <summary>The ETag of the item.</summary>
        public virtual string ETag { get; set; }
    }    

    public class BigtableOptions : Google.Apis.Requests.IDirectResponseSchema
    {
        /// <summary>[Optional] List of column families to expose in the table schema along with their types. This list
        /// restricts the column families that can be referenced in queries and specifies their value types. You can use
        /// this list to do type conversions - see the 'type' field for more details. If you leave this list empty, all
        /// column families are present in the table schema and their values are read as BYTES. During a query only the
        /// column families referenced in that query are read from Bigtable.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("columnFamilies")]
        public virtual System.Collections.Generic.IList<BigtableColumnFamily> ColumnFamilies { get; set; } 

        /// <summary>[Optional] If field is true, then the column families that are not specified in columnFamilies list
        /// are not exposed in the table schema. Otherwise, they are read with BYTES type values. The default value is
        /// false.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("ignoreUnspecifiedColumnFamilies")]
        public virtual System.Nullable<bool> IgnoreUnspecifiedColumnFamilies { get; set; } 

        /// <summary>[Optional] If field is true, then the rowkey column families will be read and converted to string.
        /// Otherwise they are read with BYTES type values and users need to manually cast them with CAST if necessary.
        /// The default value is false.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("readRowkeyAsString")]
        public virtual System.Nullable<bool> ReadRowkeyAsString { get; set; } 

        /// <summary>The ETag of the item.</summary>
        public virtual string ETag { get; set; }
    }    

    public class CsvOptions : Google.Apis.Requests.IDirectResponseSchema
    {
        /// <summary>[Optional] Indicates if BigQuery should accept rows that are missing trailing optional columns. If
        /// true, BigQuery treats missing trailing columns as null values. If false, records with missing trailing
        /// columns are treated as bad records, and if there are too many bad records, an invalid error is returned in
        /// the job result. The default value is false.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("allowJaggedRows")]
        public virtual System.Nullable<bool> AllowJaggedRows { get; set; } 

        /// <summary>[Optional] Indicates if BigQuery should allow quoted data sections that contain newline characters
        /// in a CSV file. The default value is false.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("allowQuotedNewlines")]
        public virtual System.Nullable<bool> AllowQuotedNewlines { get; set; } 

        /// <summary>[Optional] The character encoding of the data. The supported values are UTF-8 or ISO-8859-1. The
        /// default value is UTF-8. BigQuery decodes the data after the raw, binary data has been split using the values
        /// of the quote and fieldDelimiter properties.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("encoding")]
        public virtual string Encoding { get; set; } 

        /// <summary>[Optional] The separator for fields in a CSV file. BigQuery converts the string to ISO-8859-1
        /// encoding, and then uses the first byte of the encoded string to split the data in its raw, binary state.
        /// BigQuery also supports the escape sequence "\t" to specify a tab separator. The default value is a comma
        /// (',').</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("fieldDelimiter")]
        public virtual string FieldDelimiter { get; set; } 

        /// <summary>[Optional] The value that is used to quote data sections in a CSV file. BigQuery converts the
        /// string to ISO-8859-1 encoding, and then uses the first byte of the encoded string to split the data in its
        /// raw, binary state. The default value is a double-quote ('"'). If your data does not contain quoted sections,
        /// set the property value to an empty string. If your data contains quoted newline characters, you must also
        /// set the allowQuotedNewlines property to true.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("quote")]
        public virtual string Quote { get; set; } 

        /// <summary>[Optional] The number of rows at the top of a CSV file that BigQuery will skip when reading the
        /// data. The default value is 0. This property is useful if you have header rows in the file that should be
        /// skipped.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("skipLeadingRows")]
        public virtual System.Nullable<long> SkipLeadingRows { get; set; } 

        /// <summary>The ETag of the item.</summary>
        public virtual string ETag { get; set; }
    }    

    public class Dataset : Google.Apis.Requests.IDirectResponseSchema
    {
        /// <summary>[Optional] An array of objects that define dataset access for one or more entities. You can set
        /// this property when inserting or updating a dataset in order to control who is allowed to access the data. If
        /// unspecified at dataset creation time, BigQuery adds default dataset access for the following entities:
        /// access.specialGroup: projectReaders; access.role: READER; access.specialGroup: projectWriters; access.role:
        /// WRITER; access.specialGroup: projectOwners; access.role: OWNER; access.userByEmail: [dataset creator email];
        /// access.role: OWNER;</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("access")]
        public virtual System.Collections.Generic.IList<Dataset.AccessData> Access { get; set; } 

        /// <summary>[Output-only] The time when this dataset was created, in milliseconds since the epoch.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("creationTime")]
        public virtual System.Nullable<long> CreationTime { get; set; } 

        /// <summary>[Required] A reference that identifies the dataset.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("datasetReference")]
        public virtual DatasetReference DatasetReference { get; set; } 

        /// <summary>[Optional] The default lifetime of all tables in the dataset, in milliseconds. The minimum value is
        /// 3600000 milliseconds (one hour). Once this property is set, all newly-created tables in the dataset will
        /// have an expirationTime property set to the creation time plus the value in this property, and changing the
        /// value will only affect new tables, not existing ones. When the expirationTime for a given table is reached,
        /// that table will be deleted automatically. If a table's expirationTime is modified or removed before the
        /// table expires, or if you provide an explicit expirationTime when creating a table, that value takes
        /// precedence over the default expiration time indicated by this property.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("defaultTableExpirationMs")]
        public virtual System.Nullable<long> DefaultTableExpirationMs { get; set; } 

        /// <summary>[Optional] A user-friendly description of the dataset.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("description")]
        public virtual string Description { get; set; } 

        /// <summary>[Output-only] A hash of the resource.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("etag")]
        public virtual string ETag { get; set; } 

        /// <summary>[Optional] A descriptive name for the dataset.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("friendlyName")]
        public virtual string FriendlyName { get; set; } 

        /// <summary>[Output-only] The fully-qualified unique name of the dataset in the format projectId:datasetId. The
        /// dataset name without the project name is given in the datasetId field. When creating a new dataset, leave
        /// this field blank, and instead specify the datasetId field.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("id")]
        public virtual string Id { get; set; } 

        /// <summary>[Output-only] The resource type.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("kind")]
        public virtual string Kind { get; set; } 

        /// <summary>The labels associated with this dataset. You can use these to organize and group your datasets. You
        /// can set this property when inserting or updating a dataset. See Labeling Datasets for more
        /// information.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("labels")]
        public virtual System.Collections.Generic.IDictionary<string,string> Labels { get; set; } 

        /// <summary>[Output-only] The date when this dataset or any of its tables was last modified, in milliseconds
        /// since the epoch.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("lastModifiedTime")]
        public virtual System.Nullable<long> LastModifiedTime { get; set; } 

        /// <summary>The geographic location where the dataset should reside. Possible values include EU and US. The
        /// default value is US.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("location")]
        public virtual string Location { get; set; } 

        /// <summary>[Output-only] A URL that can be used to access the resource again. You can use this URL in Get or
        /// Update requests to the resource.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("selfLink")]
        public virtual string SelfLink { get; set; } 

        

        public class AccessData
        {
            /// <summary>[Pick one] A domain to grant access to. Any users signed in with the domain specified will be
            /// granted the specified access. Example: "example.com".</summary>
            [Newtonsoft.Json.JsonPropertyAttribute("domain")]
            public virtual string Domain { get; set; } 

            /// <summary>[Pick one] An email address of a Google Group to grant access to.</summary>
            [Newtonsoft.Json.JsonPropertyAttribute("groupByEmail")]
            public virtual string GroupByEmail { get; set; } 

            /// <summary>[Required] Describes the rights granted to the user specified by the other member of the access
            /// object. The following string values are supported: READER, WRITER, OWNER.</summary>
            [Newtonsoft.Json.JsonPropertyAttribute("role")]
            public virtual string Role { get; set; } 

            /// <summary>[Pick one] A special group to grant access to. Possible values include: projectOwners: Owners
            /// of the enclosing project. projectReaders: Readers of the enclosing project. projectWriters: Writers of
            /// the enclosing project. allAuthenticatedUsers: All authenticated BigQuery users.</summary>
            [Newtonsoft.Json.JsonPropertyAttribute("specialGroup")]
            public virtual string SpecialGroup { get; set; } 

            /// <summary>[Pick one] An email address of a user to grant access to. For example:
            /// fred@example.com.</summary>
            [Newtonsoft.Json.JsonPropertyAttribute("userByEmail")]
            public virtual string UserByEmail { get; set; } 

            /// <summary>[Pick one] A view from a different dataset to grant access to. Queries executed against that
            /// view will have read access to tables in this dataset. The role field is not required when this field is
            /// set. If that view is updated by any user, access to the view needs to be granted again via an update
            /// operation.</summary>
            [Newtonsoft.Json.JsonPropertyAttribute("view")]
            public virtual TableReference View { get; set; } 

        }
    }    

    public class DatasetList : Google.Apis.Requests.IDirectResponseSchema
    {
        /// <summary>An array of the dataset resources in the project. Each resource contains basic information. For
        /// full information about a particular dataset resource, use the Datasets: get method. This property is omitted
        /// when there are no datasets in the project.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("datasets")]
        public virtual System.Collections.Generic.IList<DatasetList.DatasetsData> Datasets { get; set; } 

        /// <summary>A hash value of the results page. You can use this property to determine if the page has changed
        /// since the last request.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("etag")]
        public virtual string ETag { get; set; } 

        /// <summary>The list type. This property always returns the value "bigquery#datasetList".</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("kind")]
        public virtual string Kind { get; set; } 

        /// <summary>A token that can be used to request the next results page. This property is omitted on the final
        /// results page.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("nextPageToken")]
        public virtual string NextPageToken { get; set; } 

        

        public class DatasetsData
        {
            /// <summary>The dataset reference. Use this property to access specific parts of the dataset's ID, such as
            /// project ID or dataset ID.</summary>
            [Newtonsoft.Json.JsonPropertyAttribute("datasetReference")]
            public virtual DatasetReference DatasetReference { get; set; } 

            /// <summary>A descriptive name for the dataset, if one exists.</summary>
            [Newtonsoft.Json.JsonPropertyAttribute("friendlyName")]
            public virtual string FriendlyName { get; set; } 

            /// <summary>The fully-qualified, unique, opaque ID of the dataset.</summary>
            [Newtonsoft.Json.JsonPropertyAttribute("id")]
            public virtual string Id { get; set; } 

            /// <summary>The resource type. This property always returns the value "bigquery#dataset".</summary>
            [Newtonsoft.Json.JsonPropertyAttribute("kind")]
            public virtual string Kind { get; set; } 

            /// <summary>The labels associated with this dataset. You can use these to organize and group your
            /// datasets.</summary>
            [Newtonsoft.Json.JsonPropertyAttribute("labels")]
            public virtual System.Collections.Generic.IDictionary<string,string> Labels { get; set; } 

        }
    }    

    public class DatasetReference : Google.Apis.Requests.IDirectResponseSchema
    {
        /// <summary>[Required] A unique ID for this dataset, without the project name. The ID must contain only letters
        /// (a-z, A-Z), numbers (0-9), or underscores (_). The maximum length is 1,024 characters.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("datasetId")]
        public virtual string DatasetId { get; set; } 

        /// <summary>[Optional] The ID of the project containing this dataset.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("projectId")]
        public virtual string ProjectId { get; set; } 

        /// <summary>The ETag of the item.</summary>
        public virtual string ETag { get; set; }
    }    

    public class ErrorProto : Google.Apis.Requests.IDirectResponseSchema
    {
        /// <summary>Debugging information. This property is internal to Google and should not be used.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("debugInfo")]
        public virtual string DebugInfo { get; set; } 

        /// <summary>Specifies where the error occurred, if present.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("location")]
        public virtual string Location { get; set; } 

        /// <summary>A human-readable description of the error.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("message")]
        public virtual string Message { get; set; } 

        /// <summary>A short error code that summarizes the error.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("reason")]
        public virtual string Reason { get; set; } 

        /// <summary>The ETag of the item.</summary>
        public virtual string ETag { get; set; }
    }    

    public class ExplainQueryStage : Google.Apis.Requests.IDirectResponseSchema
    {
        /// <summary>Relative amount of time the average shard spent on CPU-bound tasks.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("computeRatioAvg")]
        public virtual System.Nullable<double> ComputeRatioAvg { get; set; } 

        /// <summary>Relative amount of time the slowest shard spent on CPU-bound tasks.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("computeRatioMax")]
        public virtual System.Nullable<double> ComputeRatioMax { get; set; } 

        /// <summary>Unique ID for stage within plan.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("id")]
        public virtual System.Nullable<long> Id { get; set; } 

        /// <summary>Human-readable name for stage.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("name")]
        public virtual string Name { get; set; } 

        /// <summary>Relative amount of time the average shard spent reading input.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("readRatioAvg")]
        public virtual System.Nullable<double> ReadRatioAvg { get; set; } 

        /// <summary>Relative amount of time the slowest shard spent reading input.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("readRatioMax")]
        public virtual System.Nullable<double> ReadRatioMax { get; set; } 

        /// <summary>Number of records read into the stage.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("recordsRead")]
        public virtual System.Nullable<long> RecordsRead { get; set; } 

        /// <summary>Number of records written by the stage.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("recordsWritten")]
        public virtual System.Nullable<long> RecordsWritten { get; set; } 

        /// <summary>Current status for the stage.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("status")]
        public virtual string Status { get; set; } 

        /// <summary>List of operations within the stage in dependency order (approximately chronological).</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("steps")]
        public virtual System.Collections.Generic.IList<ExplainQueryStep> Steps { get; set; } 

        /// <summary>Relative amount of time the average shard spent waiting to be scheduled.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("waitRatioAvg")]
        public virtual System.Nullable<double> WaitRatioAvg { get; set; } 

        /// <summary>Relative amount of time the slowest shard spent waiting to be scheduled.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("waitRatioMax")]
        public virtual System.Nullable<double> WaitRatioMax { get; set; } 

        /// <summary>Relative amount of time the average shard spent on writing output.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("writeRatioAvg")]
        public virtual System.Nullable<double> WriteRatioAvg { get; set; } 

        /// <summary>Relative amount of time the slowest shard spent on writing output.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("writeRatioMax")]
        public virtual System.Nullable<double> WriteRatioMax { get; set; } 

        /// <summary>The ETag of the item.</summary>
        public virtual string ETag { get; set; }
    }    

    public class ExplainQueryStep : Google.Apis.Requests.IDirectResponseSchema
    {
        /// <summary>Machine-readable operation type.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("kind")]
        public virtual string Kind { get; set; } 

        /// <summary>Human-readable stage descriptions.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("substeps")]
        public virtual System.Collections.Generic.IList<string> Substeps { get; set; } 

        /// <summary>The ETag of the item.</summary>
        public virtual string ETag { get; set; }
    }    

    public class ExternalDataConfiguration : Google.Apis.Requests.IDirectResponseSchema
    {
        /// <summary>Try to detect schema and format options automatically. Any option specified explicitly will be
        /// honored.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("autodetect")]
        public virtual System.Nullable<bool> Autodetect { get; set; } 

        /// <summary>[Optional] Additional options if sourceFormat is set to BIGTABLE.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("bigtableOptions")]
        public virtual BigtableOptions BigtableOptions { get; set; } 

        /// <summary>[Optional] The compression type of the data source. Possible values include GZIP and NONE. The
        /// default value is NONE. This setting is ignored for Google Cloud Bigtable, Google Cloud Datastore backups and
        /// Avro formats.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("compression")]
        public virtual string Compression { get; set; } 

        /// <summary>Additional properties to set if sourceFormat is set to CSV.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("csvOptions")]
        public virtual CsvOptions CsvOptions { get; set; } 

        /// <summary>[Optional] Additional options if sourceFormat is set to GOOGLE_SHEETS.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("googleSheetsOptions")]
        public virtual GoogleSheetsOptions GoogleSheetsOptions { get; set; } 

        /// <summary>[Optional] Indicates if BigQuery should allow extra values that are not represented in the table
        /// schema. If true, the extra values are ignored. If false, records with extra columns are treated as bad
        /// records, and if there are too many bad records, an invalid error is returned in the job result. The default
        /// value is false. The sourceFormat property determines what BigQuery treats as an extra value: CSV: Trailing
        /// columns JSON: Named values that don't match any column names Google Cloud Bigtable: This setting is ignored.
        /// Google Cloud Datastore backups: This setting is ignored. Avro: This setting is ignored.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("ignoreUnknownValues")]
        public virtual System.Nullable<bool> IgnoreUnknownValues { get; set; } 

        /// <summary>[Optional] The maximum number of bad records that BigQuery can ignore when reading data. If the
        /// number of bad records exceeds this value, an invalid error is returned in the job result. The default value
        /// is 0, which requires that all records are valid. This setting is ignored for Google Cloud Bigtable, Google
        /// Cloud Datastore backups and Avro formats.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("maxBadRecords")]
        public virtual System.Nullable<int> MaxBadRecords { get; set; } 

        /// <summary>[Optional] The schema for the data. Schema is required for CSV and JSON formats. Schema is
        /// disallowed for Google Cloud Bigtable, Cloud Datastore backups, and Avro formats.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("schema")]
        public virtual TableSchema Schema { get; set; } 

        /// <summary>[Required] The data format. For CSV files, specify "CSV". For Google sheets, specify
        /// "GOOGLE_SHEETS". For newline-delimited JSON, specify "NEWLINE_DELIMITED_JSON". For Avro files, specify
        /// "AVRO". For Google Cloud Datastore backups, specify "DATASTORE_BACKUP". [Beta] For Google Cloud Bigtable,
        /// specify "BIGTABLE".</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("sourceFormat")]
        public virtual string SourceFormat { get; set; } 

        /// <summary>[Required] The fully-qualified URIs that point to your data in Google Cloud. For Google Cloud
        /// Storage URIs: Each URI can contain one '*' wildcard character and it must come after the 'bucket' name. Size
        /// limits related to load jobs apply to external data sources. For Google Cloud Bigtable URIs: Exactly one URI
        /// can be specified and it has be a fully specified and valid HTTPS URL for a Google Cloud Bigtable table. For
        /// Google Cloud Datastore backups, exactly one URI can be specified, and it must end with '.backup_info'. Also,
        /// the '*' wildcard character is not allowed.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("sourceUris")]
        public virtual System.Collections.Generic.IList<string> SourceUris { get; set; } 

        /// <summary>The ETag of the item.</summary>
        public virtual string ETag { get; set; }
    }    

    public class GetQueryResultsResponse : Google.Apis.Requests.IDirectResponseSchema
    {
        /// <summary>Whether the query result was fetched from the query cache.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("cacheHit")]
        public virtual System.Nullable<bool> CacheHit { get; set; } 

        /// <summary>[Output-only] All errors and warnings encountered during the running of the job. Errors here do not
        /// necessarily mean that the job has completed or was unsuccessful.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("errors")]
        public virtual System.Collections.Generic.IList<ErrorProto> Errors { get; set; } 

        /// <summary>A hash of this response.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("etag")]
        public virtual string ETag { get; set; } 

        /// <summary>Whether the query has completed or not. If rows or totalRows are present, this will always be true.
        /// If this is false, totalRows will not be available.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("jobComplete")]
        public virtual System.Nullable<bool> JobComplete { get; set; } 

        /// <summary>Reference to the BigQuery Job that was created to run the query. This field will be present even if
        /// the original request timed out, in which case GetQueryResults can be used to read the results once the query
        /// has completed. Since this API only returns the first page of results, subsequent pages can be fetched via
        /// the same mechanism (GetQueryResults).</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("jobReference")]
        public virtual JobReference JobReference { get; set; } 

        /// <summary>The resource type of the response.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("kind")]
        public virtual string Kind { get; set; } 

        /// <summary>[Output-only] The number of rows affected by a DML statement. Present only for DML statements
        /// INSERT, UPDATE or DELETE.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("numDmlAffectedRows")]
        public virtual System.Nullable<long> NumDmlAffectedRows { get; set; } 

        /// <summary>A token used for paging results.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("pageToken")]
        public virtual string PageToken { get; set; } 

        /// <summary>An object with as many results as can be contained within the maximum permitted reply size. To get
        /// any additional rows, you can call GetQueryResults and specify the jobReference returned above. Present only
        /// when the query completes successfully.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("rows")]
        public virtual System.Collections.Generic.IList<TableRow> Rows { get; set; } 

        /// <summary>The schema of the results. Present only when the query completes successfully.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("schema")]
        public virtual TableSchema Schema { get; set; } 

        /// <summary>The total number of bytes processed for this query.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("totalBytesProcessed")]
        public virtual System.Nullable<long> TotalBytesProcessed { get; set; } 

        /// <summary>The total number of rows in the complete query result set, which can be more than the number of
        /// rows in this single page of results. Present only when the query completes successfully.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("totalRows")]
        public virtual System.Nullable<ulong> TotalRows { get; set; } 

    }    

    public class GoogleSheetsOptions : Google.Apis.Requests.IDirectResponseSchema
    {
        /// <summary>[Optional] The number of rows at the top of a sheet that BigQuery will skip when reading the data.
        /// The default value is 0. This property is useful if you have header rows that should be skipped. When
        /// autodetect is on, behavior is the following: * skipLeadingRows unspecified - Autodetect tries to detect
        /// headers in the first row. If they are not detected, the row is read as data. Otherwise data is read starting
        /// from the second row. * skipLeadingRows is 0 - Instructs autodetect that there are no headers and data should
        /// be read starting from the first row. * skipLeadingRows = N > 0 - Autodetect skips N-1 rows and tries to
        /// detect headers in row N. If headers are not detected, row N is just skipped. Otherwise row N is used to
        /// extract column names for the detected schema.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("skipLeadingRows")]
        public virtual System.Nullable<long> SkipLeadingRows { get; set; } 

        /// <summary>The ETag of the item.</summary>
        public virtual string ETag { get; set; }
    }    

    public class Job : Google.Apis.Requests.IDirectResponseSchema
    {
        /// <summary>[Required] Describes the job configuration.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("configuration")]
        public virtual JobConfiguration Configuration { get; set; } 

        /// <summary>[Output-only] A hash of this resource.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("etag")]
        public virtual string ETag { get; set; } 

        /// <summary>[Output-only] Opaque ID field of the job</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("id")]
        public virtual string Id { get; set; } 

        /// <summary>[Optional] Reference describing the unique-per-user name of the job.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("jobReference")]
        public virtual JobReference JobReference { get; set; } 

        /// <summary>[Output-only] The type of the resource.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("kind")]
        public virtual string Kind { get; set; } 

        /// <summary>[Output-only] A URL that can be used to access this resource again.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("selfLink")]
        public virtual string SelfLink { get; set; } 

        /// <summary>[Output-only] Information about the job, including starting time and ending time of the
        /// job.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("statistics")]
        public virtual JobStatistics Statistics { get; set; } 

        /// <summary>[Output-only] The status of this job. Examine this value when polling an asynchronous job to see if
        /// the job is complete.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("status")]
        public virtual JobStatus Status { get; set; } 

        /// <summary>[Output-only] Email address of the user who ran the job.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("user_email")]
        public virtual string UserEmail { get; set; } 

    }    

    public class JobCancelResponse : Google.Apis.Requests.IDirectResponseSchema
    {
        /// <summary>The final state of the job.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("job")]
        public virtual Job Job { get; set; } 

        /// <summary>The resource type of the response.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("kind")]
        public virtual string Kind { get; set; } 

        /// <summary>The ETag of the item.</summary>
        public virtual string ETag { get; set; }
    }    

    public class JobConfiguration : Google.Apis.Requests.IDirectResponseSchema
    {
        /// <summary>[Pick one] Copies a table.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("copy")]
        public virtual JobConfigurationTableCopy Copy { get; set; } 

        /// <summary>[Optional] If set, don't actually run this job. A valid query will return a mostly empty response
        /// with some processing statistics, while an invalid query will return the same error it would if it wasn't a
        /// dry run. Behavior of non-query jobs is undefined.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("dryRun")]
        public virtual System.Nullable<bool> DryRun { get; set; } 

        /// <summary>[Pick one] Configures an extract job.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("extract")]
        public virtual JobConfigurationExtract Extract { get; set; } 

        /// <summary>[Experimental] The labels associated with this job. You can use these to organize and group your
        /// jobs. Label keys and values can be no longer than 63 characters, can only contain lowercase letters, numeric
        /// characters, underscores and dashes. International characters are allowed. Label values are optional. Label
        /// keys must start with a letter and each label in the list must have a different key.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("labels")]
        public virtual System.Collections.Generic.IDictionary<string,string> Labels { get; set; } 

        /// <summary>[Pick one] Configures a load job.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("load")]
        public virtual JobConfigurationLoad Load { get; set; } 

        /// <summary>[Pick one] Configures a query job.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("query")]
        public virtual JobConfigurationQuery Query { get; set; } 

        /// <summary>The ETag of the item.</summary>
        public virtual string ETag { get; set; }
    }    

    public class JobConfigurationExtract : Google.Apis.Requests.IDirectResponseSchema
    {
        /// <summary>[Optional] The compression type to use for exported files. Possible values include GZIP and NONE.
        /// The default value is NONE.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("compression")]
        public virtual string Compression { get; set; } 

        /// <summary>[Optional] The exported file format. Possible values include CSV, NEWLINE_DELIMITED_JSON and AVRO.
        /// The default value is CSV. Tables with nested or repeated fields cannot be exported as CSV.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("destinationFormat")]
        public virtual string DestinationFormat { get; set; } 

        /// <summary>[Pick one] DEPRECATED: Use destinationUris instead, passing only one URI as necessary. The fully-
        /// qualified Google Cloud Storage URI where the extracted table should be written.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("destinationUri")]
        public virtual string DestinationUri { get; set; } 

        /// <summary>[Pick one] A list of fully-qualified Google Cloud Storage URIs where the extracted table should be
        /// written.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("destinationUris")]
        public virtual System.Collections.Generic.IList<string> DestinationUris { get; set; } 

        /// <summary>[Optional] Delimiter to use between fields in the exported data. Default is ','</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("fieldDelimiter")]
        public virtual string FieldDelimiter { get; set; } 

        /// <summary>[Optional] Whether to print out a header row in the results. Default is true.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("printHeader")]
        public virtual System.Nullable<bool> PrintHeader { get; set; } 

        /// <summary>[Required] A reference to the table being exported.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("sourceTable")]
        public virtual TableReference SourceTable { get; set; } 

        /// <summary>The ETag of the item.</summary>
        public virtual string ETag { get; set; }
    }    

    public class JobConfigurationLoad : Google.Apis.Requests.IDirectResponseSchema
    {
        /// <summary>[Optional] Accept rows that are missing trailing optional columns. The missing values are treated
        /// as nulls. If false, records with missing trailing columns are treated as bad records, and if there are too
        /// many bad records, an invalid error is returned in the job result. The default value is false. Only
        /// applicable to CSV, ignored for other formats.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("allowJaggedRows")]
        public virtual System.Nullable<bool> AllowJaggedRows { get; set; } 

        /// <summary>Indicates if BigQuery should allow quoted data sections that contain newline characters in a CSV
        /// file. The default value is false.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("allowQuotedNewlines")]
        public virtual System.Nullable<bool> AllowQuotedNewlines { get; set; } 

        /// <summary>Indicates if we should automatically infer the options and schema for CSV and JSON
        /// sources.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("autodetect")]
        public virtual System.Nullable<bool> Autodetect { get; set; } 

        /// <summary>[Optional] Specifies whether the job is allowed to create new tables. The following values are
        /// supported: CREATE_IF_NEEDED: If the table does not exist, BigQuery creates the table. CREATE_NEVER: The
        /// table must already exist. If it does not, a 'notFound' error is returned in the job result. The default
        /// value is CREATE_IF_NEEDED. Creation, truncation and append actions occur as one atomic update upon job
        /// completion.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("createDisposition")]
        public virtual string CreateDisposition { get; set; } 

        /// <summary>[Required] The destination table to load the data into.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("destinationTable")]
        public virtual TableReference DestinationTable { get; set; } 

        /// <summary>[Optional] The character encoding of the data. The supported values are UTF-8 or ISO-8859-1. The
        /// default value is UTF-8. BigQuery decodes the data after the raw, binary data has been split using the values
        /// of the quote and fieldDelimiter properties.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("encoding")]
        public virtual string Encoding { get; set; } 

        /// <summary>[Optional] The separator for fields in a CSV file. The separator can be any ISO-8859-1 single-byte
        /// character. To use a character in the range 128-255, you must encode the character as UTF8. BigQuery converts
        /// the string to ISO-8859-1 encoding, and then uses the first byte of the encoded string to split the data in
        /// its raw, binary state. BigQuery also supports the escape sequence "\t" to specify a tab separator. The
        /// default value is a comma (',').</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("fieldDelimiter")]
        public virtual string FieldDelimiter { get; set; } 

        /// <summary>[Optional] Indicates if BigQuery should allow extra values that are not represented in the table
        /// schema. If true, the extra values are ignored. If false, records with extra columns are treated as bad
        /// records, and if there are too many bad records, an invalid error is returned in the job result. The default
        /// value is false. The sourceFormat property determines what BigQuery treats as an extra value: CSV: Trailing
        /// columns JSON: Named values that don't match any column names</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("ignoreUnknownValues")]
        public virtual System.Nullable<bool> IgnoreUnknownValues { get; set; } 

        /// <summary>[Optional] The maximum number of bad records that BigQuery can ignore when running the job. If the
        /// number of bad records exceeds this value, an invalid error is returned in the job result. The default value
        /// is 0, which requires that all records are valid.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("maxBadRecords")]
        public virtual System.Nullable<int> MaxBadRecords { get; set; } 

        /// <summary>[Optional] Specifies a string that represents a null value in a CSV file. For example, if you
        /// specify "\N", BigQuery interprets "\N" as a null value when loading a CSV file. The default value is the
        /// empty string. If you set this property to a custom value, BigQuery still interprets the empty string as a
        /// null value for all data types except for STRING and BYTE. For STRING and BYTE columns, BigQuery interprets
        /// the empty string as an empty value.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("nullMarker")]
        public virtual string NullMarker { get; set; } 

        /// <summary>If sourceFormat is set to "DATASTORE_BACKUP", indicates which entity properties to load into
        /// BigQuery from a Cloud Datastore backup. Property names are case sensitive and must be top-level properties.
        /// If no properties are specified, BigQuery loads all properties. If any named property isn't found in the
        /// Cloud Datastore backup, an invalid error is returned in the job result.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("projectionFields")]
        public virtual System.Collections.Generic.IList<string> ProjectionFields { get; set; } 

        /// <summary>[Optional] The value that is used to quote data sections in a CSV file. BigQuery converts the
        /// string to ISO-8859-1 encoding, and then uses the first byte of the encoded string to split the data in its
        /// raw, binary state. The default value is a double-quote ('"'). If your data does not contain quoted sections,
        /// set the property value to an empty string. If your data contains quoted newline characters, you must also
        /// set the allowQuotedNewlines property to true.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("quote")]
        public virtual string Quote { get; set; } 

        /// <summary>[Optional] The schema for the destination table. The schema can be omitted if the destination table
        /// already exists, or if you're loading data from Google Cloud Datastore.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("schema")]
        public virtual TableSchema Schema { get; set; } 

        /// <summary>[Deprecated] The inline schema. For CSV schemas, specify as "Field1:Type1[,Field2:Type2]*". For
        /// example, "foo:STRING, bar:INTEGER, baz:FLOAT".</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("schemaInline")]
        public virtual string SchemaInline { get; set; } 

        /// <summary>[Deprecated] The format of the schemaInline property.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("schemaInlineFormat")]
        public virtual string SchemaInlineFormat { get; set; } 

        /// <summary>[Experimental] Allows the schema of the desitination table to be updated as a side effect of the
        /// load job. Schema update options are supported in two cases: when writeDisposition is WRITE_APPEND; when
        /// writeDisposition is WRITE_TRUNCATE and the destination table is a partition of a table, specified by
        /// partition decorators. For normal tables, WRITE_TRUNCATE will always overwrite the schema. One or more of the
        /// following values are specified: ALLOW_FIELD_ADDITION: allow adding a nullable field to the schema.
        /// ALLOW_FIELD_RELAXATION: allow relaxing a required field in the original schema to nullable.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("schemaUpdateOptions")]
        public virtual System.Collections.Generic.IList<string> SchemaUpdateOptions { get; set; } 

        /// <summary>[Optional] The number of rows at the top of a CSV file that BigQuery will skip when loading the
        /// data. The default value is 0. This property is useful if you have header rows in the file that should be
        /// skipped.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("skipLeadingRows")]
        public virtual System.Nullable<int> SkipLeadingRows { get; set; } 

        /// <summary>[Optional] The format of the data files. For CSV files, specify "CSV". For datastore backups,
        /// specify "DATASTORE_BACKUP". For newline-delimited JSON, specify "NEWLINE_DELIMITED_JSON". For Avro, specify
        /// "AVRO". The default value is CSV.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("sourceFormat")]
        public virtual string SourceFormat { get; set; } 

        /// <summary>[Required] The fully-qualified URIs that point to your data in Google Cloud Storage. Each URI can
        /// contain one '*' wildcard character and it must come after the 'bucket' name.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("sourceUris")]
        public virtual System.Collections.Generic.IList<string> SourceUris { get; set; } 

        /// <summary>[Optional] Specifies the action that occurs if the destination table already exists. The following
        /// values are supported: WRITE_TRUNCATE: If the table already exists, BigQuery overwrites the table data.
        /// WRITE_APPEND: If the table already exists, BigQuery appends the data to the table. WRITE_EMPTY: If the table
        /// already exists and contains data, a 'duplicate' error is returned in the job result. The default value is
        /// WRITE_APPEND. Each action is atomic and only occurs if BigQuery is able to complete the job successfully.
        /// Creation, truncation and append actions occur as one atomic update upon job completion.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("writeDisposition")]
        public virtual string WriteDisposition { get; set; } 

        /// <summary>The ETag of the item.</summary>
        public virtual string ETag { get; set; }
    }    

    public class JobConfigurationQuery : Google.Apis.Requests.IDirectResponseSchema
    {
        /// <summary>If true, allows the query to produce arbitrarily large result tables at a slight cost in
        /// performance. Requires destinationTable to be set.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("allowLargeResults")]
        public virtual System.Nullable<bool> AllowLargeResults { get; set; } 

        /// <summary>[Optional] Specifies whether the job is allowed to create new tables. The following values are
        /// supported: CREATE_IF_NEEDED: If the table does not exist, BigQuery creates the table. CREATE_NEVER: The
        /// table must already exist. If it does not, a 'notFound' error is returned in the job result. The default
        /// value is CREATE_IF_NEEDED. Creation, truncation and append actions occur as one atomic update upon job
        /// completion.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("createDisposition")]
        public virtual string CreateDisposition { get; set; } 

        /// <summary>[Optional] Specifies the default dataset to use for unqualified table names in the query.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("defaultDataset")]
        public virtual DatasetReference DefaultDataset { get; set; } 

        /// <summary>[Optional] Describes the table where the query results should be stored. If not present, a new
        /// table will be created to store the results.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("destinationTable")]
        public virtual TableReference DestinationTable { get; set; } 

        /// <summary>[Optional] Flattens all nested and repeated fields in the query results. The default value is true.
        /// allowLargeResults must be true if this is set to false.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("flattenResults")]
        public virtual System.Nullable<bool> FlattenResults { get; set; } 

        /// <summary>[Optional] Limits the billing tier for this job. Queries that have resource usage beyond this tier
        /// will fail (without incurring a charge). If unspecified, this will be set to your project default.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("maximumBillingTier")]
        public virtual System.Nullable<int> MaximumBillingTier { get; set; } 

        /// <summary>[Optional] Limits the bytes billed for this job. Queries that will have bytes billed beyond this
        /// limit will fail (without incurring a charge). If unspecified, this will be set to your project
        /// default.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("maximumBytesBilled")]
        public virtual System.Nullable<long> MaximumBytesBilled { get; set; } 

        /// <summary>Standard SQL only. Set to POSITIONAL to use positional (?) query parameters or to NAMED to use
        /// named (@myparam) query parameters in this query.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("parameterMode")]
        public virtual string ParameterMode { get; set; } 

        /// <summary>[Deprecated] This property is deprecated.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("preserveNulls")]
        public virtual System.Nullable<bool> PreserveNulls { get; set; } 

        /// <summary>[Optional] Specifies a priority for the query. Possible values include INTERACTIVE and BATCH. The
        /// default value is INTERACTIVE.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("priority")]
        public virtual string Priority { get; set; } 

        /// <summary>[Required] BigQuery SQL query to execute.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("query")]
        public virtual string Query { get; set; } 

        /// <summary>Query parameters for standard SQL queries.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("queryParameters")]
        public virtual System.Collections.Generic.IList<QueryParameter> QueryParameters { get; set; } 

        /// <summary>[Experimental] Allows the schema of the destination table to be updated as a side effect of the
        /// query job. Schema update options are supported in two cases: when writeDisposition is WRITE_APPEND; when
        /// writeDisposition is WRITE_TRUNCATE and the destination table is a partition of a table, specified by
        /// partition decorators. For normal tables, WRITE_TRUNCATE will always overwrite the schema. One or more of the
        /// following values are specified: ALLOW_FIELD_ADDITION: allow adding a nullable field to the schema.
        /// ALLOW_FIELD_RELAXATION: allow relaxing a required field in the original schema to nullable.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("schemaUpdateOptions")]
        public virtual System.Collections.Generic.IList<string> SchemaUpdateOptions { get; set; } 

        /// <summary>[Optional] If querying an external data source outside of BigQuery, describes the data format,
        /// location and other properties of the data source. By defining these properties, the data source can then be
        /// queried as if it were a standard BigQuery table.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("tableDefinitions")]
        public virtual System.Collections.Generic.IDictionary<string,ExternalDataConfiguration> TableDefinitions { get; set; } 

        /// <summary>Specifies whether to use BigQuery's legacy SQL dialect for this query. The default value is true.
        /// If set to false, the query will use BigQuery's standard SQL: https://cloud.google.com/bigquery/sql-
        /// reference/ When useLegacySql is set to false, the values of allowLargeResults and flattenResults are
        /// ignored; query will be run as if allowLargeResults is true and flattenResults is false.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("useLegacySql")]
        public virtual System.Nullable<bool> UseLegacySql { get; set; } 

        /// <summary>[Optional] Whether to look for the result in the query cache. The query cache is a best-effort
        /// cache that will be flushed whenever tables in the query are modified. Moreover, the query cache is only
        /// available when a query does not have a destination table specified. The default value is true.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("useQueryCache")]
        public virtual System.Nullable<bool> UseQueryCache { get; set; } 

        /// <summary>Describes user-defined function resources used in the query.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("userDefinedFunctionResources")]
        public virtual System.Collections.Generic.IList<UserDefinedFunctionResource> UserDefinedFunctionResources { get; set; } 

        /// <summary>[Optional] Specifies the action that occurs if the destination table already exists. The following
        /// values are supported: WRITE_TRUNCATE: If the table already exists, BigQuery overwrites the table data.
        /// WRITE_APPEND: If the table already exists, BigQuery appends the data to the table. WRITE_EMPTY: If the table
        /// already exists and contains data, a 'duplicate' error is returned in the job result. The default value is
        /// WRITE_EMPTY. Each action is atomic and only occurs if BigQuery is able to complete the job successfully.
        /// Creation, truncation and append actions occur as one atomic update upon job completion.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("writeDisposition")]
        public virtual string WriteDisposition { get; set; } 

        /// <summary>The ETag of the item.</summary>
        public virtual string ETag { get; set; }
    }    

    public class JobConfigurationTableCopy : Google.Apis.Requests.IDirectResponseSchema
    {
        /// <summary>[Optional] Specifies whether the job is allowed to create new tables. The following values are
        /// supported: CREATE_IF_NEEDED: If the table does not exist, BigQuery creates the table. CREATE_NEVER: The
        /// table must already exist. If it does not, a 'notFound' error is returned in the job result. The default
        /// value is CREATE_IF_NEEDED. Creation, truncation and append actions occur as one atomic update upon job
        /// completion.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("createDisposition")]
        public virtual string CreateDisposition { get; set; } 

        /// <summary>[Required] The destination table</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("destinationTable")]
        public virtual TableReference DestinationTable { get; set; } 

        /// <summary>[Pick one] Source table to copy.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("sourceTable")]
        public virtual TableReference SourceTable { get; set; } 

        /// <summary>[Pick one] Source tables to copy.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("sourceTables")]
        public virtual System.Collections.Generic.IList<TableReference> SourceTables { get; set; } 

        /// <summary>[Optional] Specifies the action that occurs if the destination table already exists. The following
        /// values are supported: WRITE_TRUNCATE: If the table already exists, BigQuery overwrites the table data.
        /// WRITE_APPEND: If the table already exists, BigQuery appends the data to the table. WRITE_EMPTY: If the table
        /// already exists and contains data, a 'duplicate' error is returned in the job result. The default value is
        /// WRITE_EMPTY. Each action is atomic and only occurs if BigQuery is able to complete the job successfully.
        /// Creation, truncation and append actions occur as one atomic update upon job completion.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("writeDisposition")]
        public virtual string WriteDisposition { get; set; } 

        /// <summary>The ETag of the item.</summary>
        public virtual string ETag { get; set; }
    }    

    public class JobList : Google.Apis.Requests.IDirectResponseSchema
    {
        /// <summary>A hash of this page of results.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("etag")]
        public virtual string ETag { get; set; } 

        /// <summary>List of jobs that were requested.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("jobs")]
        public virtual System.Collections.Generic.IList<JobList.JobsData> Jobs { get; set; } 

        /// <summary>The resource type of the response.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("kind")]
        public virtual string Kind { get; set; } 

        /// <summary>A token to request the next page of results.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("nextPageToken")]
        public virtual string NextPageToken { get; set; } 

        

        public class JobsData
        {
            /// <summary>[Full-projection-only] Specifies the job configuration.</summary>
            [Newtonsoft.Json.JsonPropertyAttribute("configuration")]
            public virtual JobConfiguration Configuration { get; set; } 

            /// <summary>A result object that will be present only if the job has failed.</summary>
            [Newtonsoft.Json.JsonPropertyAttribute("errorResult")]
            public virtual ErrorProto ErrorResult { get; set; } 

            /// <summary>Unique opaque ID of the job.</summary>
            [Newtonsoft.Json.JsonPropertyAttribute("id")]
            public virtual string Id { get; set; } 

            /// <summary>Job reference uniquely identifying the job.</summary>
            [Newtonsoft.Json.JsonPropertyAttribute("jobReference")]
            public virtual JobReference JobReference { get; set; } 

            /// <summary>The resource type.</summary>
            [Newtonsoft.Json.JsonPropertyAttribute("kind")]
            public virtual string Kind { get; set; } 

            /// <summary>Running state of the job. When the state is DONE, errorResult can be checked to determine
            /// whether the job succeeded or failed.</summary>
            [Newtonsoft.Json.JsonPropertyAttribute("state")]
            public virtual string State { get; set; } 

            /// <summary>[Output-only] Information about the job, including starting time and ending time of the
            /// job.</summary>
            [Newtonsoft.Json.JsonPropertyAttribute("statistics")]
            public virtual JobStatistics Statistics { get; set; } 

            /// <summary>[Full-projection-only] Describes the state of the job.</summary>
            [Newtonsoft.Json.JsonPropertyAttribute("status")]
            public virtual JobStatus Status { get; set; } 

            /// <summary>[Full-projection-only] Email address of the user who ran the job.</summary>
            [Newtonsoft.Json.JsonPropertyAttribute("user_email")]
            public virtual string UserEmail { get; set; } 

        }
    }    

    public class JobReference : Google.Apis.Requests.IDirectResponseSchema
    {
        /// <summary>[Required] The ID of the job. The ID must contain only letters (a-z, A-Z), numbers (0-9),
        /// underscores (_), or dashes (-). The maximum length is 1,024 characters.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("jobId")]
        public virtual string JobId { get; set; } 

        /// <summary>[Required] The ID of the project containing this job.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("projectId")]
        public virtual string ProjectId { get; set; } 

        /// <summary>The ETag of the item.</summary>
        public virtual string ETag { get; set; }
    }    

    public class JobStatistics : Google.Apis.Requests.IDirectResponseSchema
    {
        /// <summary>[Output-only] Creation time of this job, in milliseconds since the epoch. This field will be
        /// present on all jobs.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("creationTime")]
        public virtual System.Nullable<long> CreationTime { get; set; } 

        /// <summary>[Output-only] End time of this job, in milliseconds since the epoch. This field will be present
        /// whenever a job is in the DONE state.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("endTime")]
        public virtual System.Nullable<long> EndTime { get; set; } 

        /// <summary>[Output-only] Statistics for an extract job.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("extract")]
        public virtual JobStatistics4 Extract { get; set; } 

        /// <summary>[Output-only] Statistics for a load job.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("load")]
        public virtual JobStatistics3 Load { get; set; } 

        /// <summary>[Output-only] Statistics for a query job.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("query")]
        public virtual JobStatistics2 Query { get; set; } 

        /// <summary>[Output-only] Start time of this job, in milliseconds since the epoch. This field will be present
        /// when the job transitions from the PENDING state to either RUNNING or DONE.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("startTime")]
        public virtual System.Nullable<long> StartTime { get; set; } 

        /// <summary>[Output-only] [Deprecated] Use the bytes processed in the query statistics instead.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("totalBytesProcessed")]
        public virtual System.Nullable<long> TotalBytesProcessed { get; set; } 

        /// <summary>The ETag of the item.</summary>
        public virtual string ETag { get; set; }
    }    

    public class JobStatistics2 : Google.Apis.Requests.IDirectResponseSchema
    {
        /// <summary>[Output-only] Billing tier for the job.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("billingTier")]
        public virtual System.Nullable<int> BillingTier { get; set; } 

        /// <summary>[Output-only] Whether the query result was fetched from the query cache.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("cacheHit")]
        public virtual System.Nullable<bool> CacheHit { get; set; } 

        /// <summary>[Output-only] The number of rows affected by a DML statement. Present only for DML statements
        /// INSERT, UPDATE or DELETE.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("numDmlAffectedRows")]
        public virtual System.Nullable<long> NumDmlAffectedRows { get; set; } 

        /// <summary>[Output-only] Describes execution plan for the query.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("queryPlan")]
        public virtual System.Collections.Generic.IList<ExplainQueryStage> QueryPlan { get; set; } 

        /// <summary>[Output-only, Experimental] Referenced tables for the job. Queries that reference more than 50
        /// tables will not have a complete list.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("referencedTables")]
        public virtual System.Collections.Generic.IList<TableReference> ReferencedTables { get; set; } 

        /// <summary>[Output-only, Experimental] The schema of the results. Present only for successful dry run of non-
        /// legacy SQL queries.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("schema")]
        public virtual TableSchema Schema { get; set; } 

        /// <summary>[Output-only, Experimental] The type of query statement, if valid.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("statementType")]
        public virtual string StatementType { get; set; } 

        /// <summary>[Output-only] Total bytes billed for the job.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("totalBytesBilled")]
        public virtual System.Nullable<long> TotalBytesBilled { get; set; } 

        /// <summary>[Output-only] Total bytes processed for the job.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("totalBytesProcessed")]
        public virtual System.Nullable<long> TotalBytesProcessed { get; set; } 

        /// <summary>[Output-only, Experimental] Standard SQL only: list of undeclared query parameters detected during
        /// a dry run validation.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("undeclaredQueryParameters")]
        public virtual System.Collections.Generic.IList<QueryParameter> UndeclaredQueryParameters { get; set; } 

        /// <summary>The ETag of the item.</summary>
        public virtual string ETag { get; set; }
    }    

    public class JobStatistics3 : Google.Apis.Requests.IDirectResponseSchema
    {
        /// <summary>[Output-only] Number of bytes of source data in a load job.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("inputFileBytes")]
        public virtual System.Nullable<long> InputFileBytes { get; set; } 

        /// <summary>[Output-only] Number of source files in a load job.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("inputFiles")]
        public virtual System.Nullable<long> InputFiles { get; set; } 

        /// <summary>[Output-only] Size of the loaded data in bytes. Note that while a load job is in the running state,
        /// this value may change.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("outputBytes")]
        public virtual System.Nullable<long> OutputBytes { get; set; } 

        /// <summary>[Output-only] Number of rows imported in a load job. Note that while an import job is in the
        /// running state, this value may change.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("outputRows")]
        public virtual System.Nullable<long> OutputRows { get; set; } 

        /// <summary>The ETag of the item.</summary>
        public virtual string ETag { get; set; }
    }    

    public class JobStatistics4 : Google.Apis.Requests.IDirectResponseSchema
    {
        /// <summary>[Output-only] Number of files per destination URI or URI pattern specified in the extract
        /// configuration. These values will be in the same order as the URIs specified in the 'destinationUris'
        /// field.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("destinationUriFileCounts")]
        public virtual System.Collections.Generic.IList<System.Nullable<long>> DestinationUriFileCounts { get; set; } 

        /// <summary>The ETag of the item.</summary>
        public virtual string ETag { get; set; }
    }    

    public class JobStatus : Google.Apis.Requests.IDirectResponseSchema
    {
        /// <summary>[Output-only] Final error result of the job. If present, indicates that the job has completed and
        /// was unsuccessful.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("errorResult")]
        public virtual ErrorProto ErrorResult { get; set; } 

        /// <summary>[Output-only] All errors encountered during the running of the job. Errors here do not necessarily
        /// mean that the job has completed or was unsuccessful.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("errors")]
        public virtual System.Collections.Generic.IList<ErrorProto> Errors { get; set; } 

        /// <summary>[Output-only] Running state of the job.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("state")]
        public virtual string State { get; set; } 

        /// <summary>The ETag of the item.</summary>
        public virtual string ETag { get; set; }
    }    

    public class ProjectList : Google.Apis.Requests.IDirectResponseSchema
    {
        /// <summary>A hash of the page of results</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("etag")]
        public virtual string ETag { get; set; } 

        /// <summary>The type of list.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("kind")]
        public virtual string Kind { get; set; } 

        /// <summary>A token to request the next page of results.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("nextPageToken")]
        public virtual string NextPageToken { get; set; } 

        /// <summary>Projects to which you have at least READ access.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("projects")]
        public virtual System.Collections.Generic.IList<ProjectList.ProjectsData> Projects { get; set; } 

        /// <summary>The total number of projects in the list.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("totalItems")]
        public virtual System.Nullable<int> TotalItems { get; set; } 

        

        public class ProjectsData
        {
            /// <summary>A descriptive name for this project.</summary>
            [Newtonsoft.Json.JsonPropertyAttribute("friendlyName")]
            public virtual string FriendlyName { get; set; } 

            /// <summary>An opaque ID of this project.</summary>
            [Newtonsoft.Json.JsonPropertyAttribute("id")]
            public virtual string Id { get; set; } 

            /// <summary>The resource type.</summary>
            [Newtonsoft.Json.JsonPropertyAttribute("kind")]
            public virtual string Kind { get; set; } 

            /// <summary>The numeric ID of this project.</summary>
            [Newtonsoft.Json.JsonPropertyAttribute("numericId")]
            public virtual System.Nullable<ulong> NumericId { get; set; } 

            /// <summary>A unique reference to this project.</summary>
            [Newtonsoft.Json.JsonPropertyAttribute("projectReference")]
            public virtual ProjectReference ProjectReference { get; set; } 

        }
    }    

    public class ProjectReference : Google.Apis.Requests.IDirectResponseSchema
    {
        /// <summary>[Required] ID of the project. Can be either the numeric ID or the assigned ID of the
        /// project.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("projectId")]
        public virtual string ProjectId { get; set; } 

        /// <summary>The ETag of the item.</summary>
        public virtual string ETag { get; set; }
    }    

    public class QueryParameter : Google.Apis.Requests.IDirectResponseSchema
    {
        /// <summary>[Optional] If unset, this is a positional parameter. Otherwise, should be unique within a
        /// query.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("name")]
        public virtual string Name { get; set; } 

        /// <summary>[Required] The type of this parameter.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("parameterType")]
        public virtual QueryParameterType ParameterType { get; set; } 

        /// <summary>[Required] The value of this parameter.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("parameterValue")]
        public virtual QueryParameterValue ParameterValue { get; set; } 

        /// <summary>The ETag of the item.</summary>
        public virtual string ETag { get; set; }
    }    

    public class QueryParameterType : Google.Apis.Requests.IDirectResponseSchema
    {
        /// <summary>[Optional] The type of the array's elements, if this is an array.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("arrayType")]
        public virtual QueryParameterType ArrayType { get; set; } 

        /// <summary>[Optional] The types of the fields of this struct, in order, if this is a struct.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("structTypes")]
        public virtual System.Collections.Generic.IList<QueryParameterType.StructTypesData> StructTypes { get; set; } 

        /// <summary>[Required] The top level type of this field.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("type")]
        public virtual string Type { get; set; } 

        /// <summary>The ETag of the item.</summary>
        public virtual string ETag { get; set; }
        

        public class StructTypesData
        {
            /// <summary>[Optional] Human-oriented description of the field.</summary>
            [Newtonsoft.Json.JsonPropertyAttribute("description")]
            public virtual string Description { get; set; } 

            /// <summary>[Optional] The name of this field.</summary>
            [Newtonsoft.Json.JsonPropertyAttribute("name")]
            public virtual string Name { get; set; } 

            /// <summary>[Required] The type of this field.</summary>
            [Newtonsoft.Json.JsonPropertyAttribute("type")]
            public virtual QueryParameterType Type { get; set; } 

        }
    }    

    public class QueryParameterValue : Google.Apis.Requests.IDirectResponseSchema
    {
        /// <summary>[Optional] The array values, if this is an array type.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("arrayValues")]
        public virtual System.Collections.Generic.IList<QueryParameterValue> ArrayValues { get; set; } 

        /// <summary>[Optional] The struct field values, in order of the struct type's declaration.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("structValues")]
        public virtual System.Collections.Generic.IDictionary<string,QueryParameterValue> StructValues { get; set; } 

        /// <summary>[Optional] The value of this value, if a simple scalar type.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("value")]
        public virtual string Value { get; set; } 

        /// <summary>The ETag of the item.</summary>
        public virtual string ETag { get; set; }
    }    

    public class QueryRequest : Google.Apis.Requests.IDirectResponseSchema
    {
        /// <summary>[Optional] Specifies the default datasetId and projectId to assume for any unqualified table names
        /// in the query. If not set, all table names in the query string must be qualified in the format
        /// 'datasetId.tableId'.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("defaultDataset")]
        public virtual DatasetReference DefaultDataset { get; set; } 

        /// <summary>[Optional] If set to true, BigQuery doesn't run the job. Instead, if the query is valid, BigQuery
        /// returns statistics about the job such as how many bytes would be processed. If the query is invalid, an
        /// error returns. The default value is false.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("dryRun")]
        public virtual System.Nullable<bool> DryRun { get; set; } 

        /// <summary>The resource type of the request.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("kind")]
        public virtual string Kind { get; set; } 

        /// <summary>[Optional] The maximum number of rows of data to return per page of results. Setting this flag to a
        /// small value such as 1000 and then paging through results might improve reliability when the query result set
        /// is large. In addition to this limit, responses are also limited to 10 MB. By default, there is no maximum
        /// row count, and only the byte limit applies.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("maxResults")]
        public virtual System.Nullable<long> MaxResults { get; set; } 

        /// <summary>Standard SQL only. Set to POSITIONAL to use positional (?) query parameters or to NAMED to use
        /// named (@myparam) query parameters in this query.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("parameterMode")]
        public virtual string ParameterMode { get; set; } 

        /// <summary>[Deprecated] This property is deprecated.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("preserveNulls")]
        public virtual System.Nullable<bool> PreserveNulls { get; set; } 

        /// <summary>[Required] A query string, following the BigQuery query syntax, of the query to execute. Example:
        /// "SELECT count(f1) FROM [myProjectId:myDatasetId.myTableId]".</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("query")]
        public virtual string Query { get; set; } 

        /// <summary>Query parameters for Standard SQL queries.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("queryParameters")]
        public virtual System.Collections.Generic.IList<QueryParameter> QueryParameters { get; set; } 

        /// <summary>[Optional] How long to wait for the query to complete, in milliseconds, before the request times
        /// out and returns. Note that this is only a timeout for the request, not the query. If the query takes longer
        /// to run than the timeout value, the call returns without any results and with the 'jobComplete' flag set to
        /// false. You can call GetQueryResults() to wait for the query to complete and read the results. The default
        /// value is 10000 milliseconds (10 seconds).</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("timeoutMs")]
        public virtual System.Nullable<long> TimeoutMs { get; set; } 

        /// <summary>Specifies whether to use BigQuery's legacy SQL dialect for this query. The default value is true.
        /// If set to false, the query will use BigQuery's standard SQL: https://cloud.google.com/bigquery/sql-
        /// reference/ When useLegacySql is set to false, the values of allowLargeResults and flattenResults are
        /// ignored; query will be run as if allowLargeResults is true and flattenResults is false.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("useLegacySql")]
        public virtual System.Nullable<bool> UseLegacySql { get; set; } 

        /// <summary>[Optional] Whether to look for the result in the query cache. The query cache is a best-effort
        /// cache that will be flushed whenever tables in the query are modified. The default value is true.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("useQueryCache")]
        public virtual System.Nullable<bool> UseQueryCache { get; set; } 

        /// <summary>The ETag of the item.</summary>
        public virtual string ETag { get; set; }
    }    

    public class QueryResponse : Google.Apis.Requests.IDirectResponseSchema
    {
        /// <summary>Whether the query result was fetched from the query cache.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("cacheHit")]
        public virtual System.Nullable<bool> CacheHit { get; set; } 

        /// <summary>[Output-only] All errors and warnings encountered during the running of the job. Errors here do not
        /// necessarily mean that the job has completed or was unsuccessful.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("errors")]
        public virtual System.Collections.Generic.IList<ErrorProto> Errors { get; set; } 

        /// <summary>Whether the query has completed or not. If rows or totalRows are present, this will always be true.
        /// If this is false, totalRows will not be available.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("jobComplete")]
        public virtual System.Nullable<bool> JobComplete { get; set; } 

        /// <summary>Reference to the Job that was created to run the query. This field will be present even if the
        /// original request timed out, in which case GetQueryResults can be used to read the results once the query has
        /// completed. Since this API only returns the first page of results, subsequent pages can be fetched via the
        /// same mechanism (GetQueryResults).</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("jobReference")]
        public virtual JobReference JobReference { get; set; } 

        /// <summary>The resource type.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("kind")]
        public virtual string Kind { get; set; } 

        /// <summary>[Output-only] The number of rows affected by a DML statement. Present only for DML statements
        /// INSERT, UPDATE or DELETE.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("numDmlAffectedRows")]
        public virtual System.Nullable<long> NumDmlAffectedRows { get; set; } 

        /// <summary>A token used for paging results.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("pageToken")]
        public virtual string PageToken { get; set; } 

        /// <summary>An object with as many results as can be contained within the maximum permitted reply size. To get
        /// any additional rows, you can call GetQueryResults and specify the jobReference returned above.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("rows")]
        public virtual System.Collections.Generic.IList<TableRow> Rows { get; set; } 

        /// <summary>The schema of the results. Present only when the query completes successfully.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("schema")]
        public virtual TableSchema Schema { get; set; } 

        /// <summary>The total number of bytes processed for this query. If this query was a dry run, this is the number
        /// of bytes that would be processed if the query were run.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("totalBytesProcessed")]
        public virtual System.Nullable<long> TotalBytesProcessed { get; set; } 

        /// <summary>The total number of rows in the complete query result set, which can be more than the number of
        /// rows in this single page of results.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("totalRows")]
        public virtual System.Nullable<ulong> TotalRows { get; set; } 

        /// <summary>The ETag of the item.</summary>
        public virtual string ETag { get; set; }
    }    

    public class Streamingbuffer : Google.Apis.Requests.IDirectResponseSchema
    {
        /// <summary>[Output-only] A lower-bound estimate of the number of bytes currently in the streaming
        /// buffer.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("estimatedBytes")]
        public virtual System.Nullable<ulong> EstimatedBytes { get; set; } 

        /// <summary>[Output-only] A lower-bound estimate of the number of rows currently in the streaming
        /// buffer.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("estimatedRows")]
        public virtual System.Nullable<ulong> EstimatedRows { get; set; } 

        /// <summary>[Output-only] Contains the timestamp of the oldest entry in the streaming buffer, in milliseconds
        /// since the epoch, if the streaming buffer is available.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("oldestEntryTime")]
        public virtual System.Nullable<ulong> OldestEntryTime { get; set; } 

        /// <summary>The ETag of the item.</summary>
        public virtual string ETag { get; set; }
    }    

    public class Table : Google.Apis.Requests.IDirectResponseSchema
    {
        /// <summary>[Output-only] The time when this table was created, in milliseconds since the epoch.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("creationTime")]
        public virtual System.Nullable<long> CreationTime { get; set; } 

        /// <summary>[Optional] A user-friendly description of this table.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("description")]
        public virtual string Description { get; set; } 

        /// <summary>[Output-only] A hash of this resource.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("etag")]
        public virtual string ETag { get; set; } 

        /// <summary>[Optional] The time when this table expires, in milliseconds since the epoch. If not present, the
        /// table will persist indefinitely. Expired tables will be deleted and their storage reclaimed.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("expirationTime")]
        public virtual System.Nullable<long> ExpirationTime { get; set; } 

        /// <summary>[Optional] Describes the data format, location, and other properties of a table stored outside of
        /// BigQuery. By defining these properties, the data source can then be queried as if it were a standard
        /// BigQuery table.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("externalDataConfiguration")]
        public virtual ExternalDataConfiguration ExternalDataConfiguration { get; set; } 

        /// <summary>[Optional] A descriptive name for this table.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("friendlyName")]
        public virtual string FriendlyName { get; set; } 

        /// <summary>[Output-only] An opaque ID uniquely identifying the table.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("id")]
        public virtual string Id { get; set; } 

        /// <summary>[Output-only] The type of the resource.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("kind")]
        public virtual string Kind { get; set; } 

        /// <summary>[Experimental] The labels associated with this table. You can use these to organize and group your
        /// tables. Label keys and values can be no longer than 63 characters, can only contain lowercase letters,
        /// numeric characters, underscores and dashes. International characters are allowed. Label values are optional.
        /// Label keys must start with a letter and each label in the list must have a different key.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("labels")]
        public virtual System.Collections.Generic.IDictionary<string,string> Labels { get; set; } 

        /// <summary>[Output-only] The time when this table was last modified, in milliseconds since the
        /// epoch.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("lastModifiedTime")]
        public virtual System.Nullable<ulong> LastModifiedTime { get; set; } 

        /// <summary>[Output-only] The geographic location where the table resides. This value is inherited from the
        /// dataset.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("location")]
        public virtual string Location { get; set; } 

        /// <summary>[Output-only] The size of this table in bytes, excluding any data in the streaming
        /// buffer.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("numBytes")]
        public virtual System.Nullable<long> NumBytes { get; set; } 

        /// <summary>[Output-only] The number of bytes in the table that are considered "long-term storage".</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("numLongTermBytes")]
        public virtual System.Nullable<long> NumLongTermBytes { get; set; } 

        /// <summary>[Output-only] The number of rows of data in this table, excluding any data in the streaming
        /// buffer.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("numRows")]
        public virtual System.Nullable<ulong> NumRows { get; set; } 

        /// <summary>[Optional] Describes the schema of this table.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("schema")]
        public virtual TableSchema Schema { get; set; } 

        /// <summary>[Output-only] A URL that can be used to access this resource again.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("selfLink")]
        public virtual string SelfLink { get; set; } 

        /// <summary>[Output-only] Contains information regarding this table's streaming buffer, if one is present. This
        /// field will be absent if the table is not being streamed to or if there is no data in the streaming
        /// buffer.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("streamingBuffer")]
        public virtual Streamingbuffer StreamingBuffer { get; set; } 

        /// <summary>[Required] Reference describing the ID of this table.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("tableReference")]
        public virtual TableReference TableReference { get; set; } 

        /// <summary>[Experimental] If specified, configures time-based partitioning for this table.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("timePartitioning")]
        public virtual TimePartitioning TimePartitioning { get; set; } 

        /// <summary>[Output-only] Describes the table type. The following values are supported: TABLE: A normal
        /// BigQuery table. VIEW: A virtual table defined by a SQL query. EXTERNAL: A table that references data stored
        /// in an external storage system, such as Google Cloud Storage. The default value is TABLE.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("type")]
        public virtual string Type { get; set; } 

        /// <summary>[Optional] The view definition.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("view")]
        public virtual ViewDefinition View { get; set; } 

    }    

    public class TableCell : Google.Apis.Requests.IDirectResponseSchema
    {
        [Newtonsoft.Json.JsonPropertyAttribute("v")]
        public virtual object V { get; set; } 

        /// <summary>The ETag of the item.</summary>
        public virtual string ETag { get; set; }
    }    

    public class TableDataInsertAllRequest : Google.Apis.Requests.IDirectResponseSchema
    {
        /// <summary>[Optional] Accept rows that contain values that do not match the schema. The unknown values are
        /// ignored. Default is false, which treats unknown values as errors.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("ignoreUnknownValues")]
        public virtual System.Nullable<bool> IgnoreUnknownValues { get; set; } 

        /// <summary>The resource type of the response.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("kind")]
        public virtual string Kind { get; set; } 

        /// <summary>The rows to insert.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("rows")]
        public virtual System.Collections.Generic.IList<TableDataInsertAllRequest.RowsData> Rows { get; set; } 

        /// <summary>[Optional] Insert all valid rows of a request, even if invalid rows exist. The default value is
        /// false, which causes the entire request to fail if any invalid rows exist.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("skipInvalidRows")]
        public virtual System.Nullable<bool> SkipInvalidRows { get; set; } 

        /// <summary>[Experimental] If specified, treats the destination table as a base template, and inserts the rows
        /// into an instance table named "{destination}{templateSuffix}". BigQuery will manage creation of the instance
        /// table, using the schema of the base template table. See https://cloud.google.com/bigquery/streaming-data-
        /// into-bigquery#template-tables for considerations when working with templates tables.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("templateSuffix")]
        public virtual string TemplateSuffix { get; set; } 

        /// <summary>The ETag of the item.</summary>
        public virtual string ETag { get; set; }
        

        public class RowsData
        {
            /// <summary>[Optional] A unique ID for each row. BigQuery uses this property to detect duplicate insertion
            /// requests on a best-effort basis.</summary>
            [Newtonsoft.Json.JsonPropertyAttribute("insertId")]
            public virtual string InsertId { get; set; } 

            /// <summary>[Required] A JSON object that contains a row of data. The object's properties and values must
            /// match the destination table's schema.</summary>
            [Newtonsoft.Json.JsonPropertyAttribute("json")]
            public virtual System.Collections.Generic.IDictionary<string,object> Json { get; set; } 

        }
    }    

    public class TableDataInsertAllResponse : Google.Apis.Requests.IDirectResponseSchema
    {
        /// <summary>An array of errors for rows that were not inserted.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("insertErrors")]
        public virtual System.Collections.Generic.IList<TableDataInsertAllResponse.InsertErrorsData> InsertErrors { get; set; } 

        /// <summary>The resource type of the response.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("kind")]
        public virtual string Kind { get; set; } 

        /// <summary>The ETag of the item.</summary>
        public virtual string ETag { get; set; }
        

        public class InsertErrorsData
        {
            /// <summary>Error information for the row indicated by the index property.</summary>
            [Newtonsoft.Json.JsonPropertyAttribute("errors")]
            public virtual System.Collections.Generic.IList<ErrorProto> Errors { get; set; } 

            /// <summary>The index of the row that error applies to.</summary>
            [Newtonsoft.Json.JsonPropertyAttribute("index")]
            public virtual System.Nullable<long> Index { get; set; } 

        }
    }    

    public class TableDataList : Google.Apis.Requests.IDirectResponseSchema
    {
        /// <summary>A hash of this page of results.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("etag")]
        public virtual string ETag { get; set; } 

        /// <summary>The resource type of the response.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("kind")]
        public virtual string Kind { get; set; } 

        /// <summary>A token used for paging results. Providing this token instead of the startIndex parameter can help
        /// you retrieve stable results when an underlying table is changing.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("pageToken")]
        public virtual string PageToken { get; set; } 

        /// <summary>Rows of results.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("rows")]
        public virtual System.Collections.Generic.IList<TableRow> Rows { get; set; } 

        /// <summary>The total number of rows in the complete table.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("totalRows")]
        public virtual System.Nullable<long> TotalRows { get; set; } 

    }    

    public class TableFieldSchema : Google.Apis.Requests.IDirectResponseSchema
    {
        /// <summary>[Optional] The field description. The maximum length is 16K characters.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("description")]
        public virtual string Description { get; set; } 

        /// <summary>[Optional] Describes the nested schema fields if the type property is set to RECORD.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("fields")]
        public virtual System.Collections.Generic.IList<TableFieldSchema> Fields { get; set; } 

        /// <summary>[Optional] The field mode. Possible values include NULLABLE, REQUIRED and REPEATED. The default
        /// value is NULLABLE.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("mode")]
        public virtual string Mode { get; set; } 

        /// <summary>[Required] The field name. The name must contain only letters (a-z, A-Z), numbers (0-9), or
        /// underscores (_), and must start with a letter or underscore. The maximum length is 128 characters.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("name")]
        public virtual string Name { get; set; } 

        /// <summary>[Required] The field data type. Possible values include STRING, BYTES, INTEGER, INT64 (same as
        /// INTEGER), FLOAT, FLOAT64 (same as FLOAT), BOOLEAN, BOOL (same as BOOLEAN), TIMESTAMP, DATE, TIME, DATETIME,
        /// RECORD (where RECORD indicates that the field contains a nested schema) or STRUCT (same as
        /// RECORD).</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("type")]
        public virtual string Type { get; set; } 

        /// <summary>The ETag of the item.</summary>
        public virtual string ETag { get; set; }
    }    

    public class TableList : Google.Apis.Requests.IDirectResponseSchema
    {
        /// <summary>A hash of this page of results.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("etag")]
        public virtual string ETag { get; set; } 

        /// <summary>The type of list.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("kind")]
        public virtual string Kind { get; set; } 

        /// <summary>A token to request the next page of results.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("nextPageToken")]
        public virtual string NextPageToken { get; set; } 

        /// <summary>Tables in the requested dataset.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("tables")]
        public virtual System.Collections.Generic.IList<TableList.TablesData> Tables { get; set; } 

        /// <summary>The total number of tables in the dataset.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("totalItems")]
        public virtual System.Nullable<int> TotalItems { get; set; } 

        

        public class TablesData
        {
            /// <summary>The user-friendly name for this table.</summary>
            [Newtonsoft.Json.JsonPropertyAttribute("friendlyName")]
            public virtual string FriendlyName { get; set; } 

            /// <summary>An opaque ID of the table</summary>
            [Newtonsoft.Json.JsonPropertyAttribute("id")]
            public virtual string Id { get; set; } 

            /// <summary>The resource type.</summary>
            [Newtonsoft.Json.JsonPropertyAttribute("kind")]
            public virtual string Kind { get; set; } 

            /// <summary>[Experimental] The labels associated with this table. You can use these to organize and group
            /// your tables.</summary>
            [Newtonsoft.Json.JsonPropertyAttribute("labels")]
            public virtual System.Collections.Generic.IDictionary<string,string> Labels { get; set; } 

            /// <summary>A reference uniquely identifying the table.</summary>
            [Newtonsoft.Json.JsonPropertyAttribute("tableReference")]
            public virtual TableReference TableReference { get; set; } 

            /// <summary>The type of table. Possible values are: TABLE, VIEW.</summary>
            [Newtonsoft.Json.JsonPropertyAttribute("type")]
            public virtual string Type { get; set; } 

            /// <summary>Additional details for a view.</summary>
            [Newtonsoft.Json.JsonPropertyAttribute("view")]
            public virtual TablesData.ViewData View { get; set; } 

            

            /// <summary>Additional details for a view.</summary>
            public class ViewData
            {
                /// <summary>True if view is defined in legacy SQL dialect, false if in standard SQL.</summary>
                [Newtonsoft.Json.JsonPropertyAttribute("useLegacySql")]
                public virtual System.Nullable<bool> UseLegacySql { get; set; } 

            }
        }
    }    

    public class TableReference : Google.Apis.Requests.IDirectResponseSchema
    {
        /// <summary>[Required] The ID of the dataset containing this table.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("datasetId")]
        public virtual string DatasetId { get; set; } 

        /// <summary>[Required] The ID of the project containing this table.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("projectId")]
        public virtual string ProjectId { get; set; } 

        /// <summary>[Required] The ID of the table. The ID must contain only letters (a-z, A-Z), numbers (0-9), or
        /// underscores (_). The maximum length is 1,024 characters.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("tableId")]
        public virtual string TableId { get; set; } 

        /// <summary>The ETag of the item.</summary>
        public virtual string ETag { get; set; }
    }    

    public class TableRow : Google.Apis.Requests.IDirectResponseSchema
    {
        /// <summary>Represents a single row in the result set, consisting of one or more fields.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("f")]
        public virtual System.Collections.Generic.IList<TableCell> F { get; set; } 

        /// <summary>The ETag of the item.</summary>
        public virtual string ETag { get; set; }
    }    

    public class TableSchema : Google.Apis.Requests.IDirectResponseSchema
    {
        /// <summary>Describes the fields in a table.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("fields")]
        public virtual System.Collections.Generic.IList<TableFieldSchema> Fields { get; set; } 

        /// <summary>The ETag of the item.</summary>
        public virtual string ETag { get; set; }
    }    

    public class TimePartitioning : Google.Apis.Requests.IDirectResponseSchema
    {
        /// <summary>[Optional] Number of milliseconds for which to keep the storage for a partition.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("expirationMs")]
        public virtual System.Nullable<long> ExpirationMs { get; set; } 

        /// <summary>[Required] The only type supported is DAY, which will generate one partition per day based on data
        /// loading time.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("type")]
        public virtual string Type { get; set; } 

        /// <summary>The ETag of the item.</summary>
        public virtual string ETag { get; set; }
    }    

    public class UserDefinedFunctionResource : Google.Apis.Requests.IDirectResponseSchema
    {
        /// <summary>[Pick one] An inline resource that contains code for a user-defined function (UDF). Providing a
        /// inline code resource is equivalent to providing a URI for a file containing the same code.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("inlineCode")]
        public virtual string InlineCode { get; set; } 

        /// <summary>[Pick one] A code resource to load from a Google Cloud Storage URI (gs://bucket/path).</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("resourceUri")]
        public virtual string ResourceUri { get; set; } 

        /// <summary>The ETag of the item.</summary>
        public virtual string ETag { get; set; }
    }    

    public class ViewDefinition : Google.Apis.Requests.IDirectResponseSchema
    {
        /// <summary>[Required] A query that BigQuery executes when the view is referenced.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("query")]
        public virtual string Query { get; set; } 

        /// <summary>Specifies whether to use BigQuery's legacy SQL for this view. The default value is true. If set to
        /// false, the view will use BigQuery's standard SQL: https://cloud.google.com/bigquery/sql-reference/ Queries
        /// and views that reference this view must use the same flag value.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("useLegacySql")]
        public virtual System.Nullable<bool> UseLegacySql { get; set; } 

        /// <summary>Describes user-defined function resources used in the query.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("userDefinedFunctionResources")]
        public virtual System.Collections.Generic.IList<UserDefinedFunctionResource> UserDefinedFunctionResources { get; set; } 

        /// <summary>The ETag of the item.</summary>
        public virtual string ETag { get; set; }
    }
}
